Open In App
Related Articles

Primer CSS Alerts Default

Improve Article
Improve
Save Article
Save
Like Article
Like

Primer CSS is a free open-source CSS framework that is built upon systems that create the foundation of the basic style elements such as spacing, typography, and color. This systematic method makes sure our patterns are steady and interoperable with every other. Its approach to CSS is influenced by object-oriented CSS principles, functional CSS, and BEM architecture. It is highly reusable and flexible. It is created with GitHub’s design system.

Primer CSS Alerts are alerts or flash messages to inform us about the status of the actions. Primer CSS Alerts Default is used to create the rounded rectangular alert in light blue color. In this article, we will discuss Primer CSS Alerts Default.

Primer CSS Alerts Default Classes:

  • flash: This class is used to create the flash message.
  • flash-messages: This class is used to add the space on the top and bottom to the flash message.

Syntax:

<div class="flash">
     ....
</div>

Example 1: This example demonstrates the use of the Primer CSS Alerts Default.

HTML




<!DOCTYPE html>
<html>
  
<head>
  <title> Primer CSS Alerts Default </title>
  <link rel="stylesheet" href=
"https://unpkg.com/@primer/css@^18.0.0/dist/primer.css" /> 
</head>
  
<body>
  <div class="text-center">
    <h1 class="color-fg-success"> GeeksforGeeks </h1>
    <h3> Primer CSS Alerts Default </h3
  </div> <br> <br>
  
  <div class="flash">
    A Computer Science portal for geeks. 
  </div>
</body>
</html>


Output:

Primer CSS Alerts Default

Example 2: This example demonstrates the use of the Primer CSS Alerts Default.

HTML




<!DOCTYPE html>
<html>
  
<head>
  <title> Primer CSS Alerts Default </title>
  <link rel="stylesheet" href=
"https://unpkg.com/@primer/css@^18.0.0/dist/primer.css" /> 
</head>
  
<body>
    <div class="text-center">
        <h1 class="color-fg-success"> GeeksforGeeks </h1>
        <h3> Primer CSS Alerts Default </h3
    </div> <br> <br>
  
    <div class="flash-messages">
        <div class="flash">
          <svg class="octicon" viewBox="0 0 16 16" 
               width="20" height="20" >
            <path fill-rule="evenodd" 
                  d="M11.5 7a4.499 4.499 0 11-8.998 
                  0A4.499 4.499 0 0111.5 7zm-.82 4.74a6 
                  6 0 111.06-1.06l3.04 3.04a.75.75 0 
                  11-1.06 1.06l-3.04-3.04z" >
            </path>
          </svg>
          A Computer Science portal for geeks. 
        </div>
   </div>
  
    <div class="flash-messages">
        <div class="flash">
          <svg class="octicon" viewBox="0 0 16 16" 
               width="20" height="20"
            <path fill-rule="evenodd" 
                  d="M13.78 4.22a.75.75 0 010 1.06l-7.25 
                  7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 
                  011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z" >
            </path>
          </svg>
          GeeksforGeeks 
        </div>
    </div>
</body>  
</html>


Output:

Primer CSS Alerts Default

Reference: https://primer.style/css/components/alerts#default


Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!

Last Updated : 19 Apr, 2022
Like Article
Save Article
Previous
Next
Similar Reads
Complete Tutorials