Open In App

Primer CSS Flexbox Bugs

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.

Flexbox is the flexible box that will change this size according to the resolution of the screen. 



Flexbox bug is when you perform some task and the output is keep changing when you switch the browser. For example, if you are running the code on chrome then it is giving output not the same as when you run the same code on safari.

We will now discuss two major bugs when we use flexbox.



Example 1:




<!DOCTYPE html>
<html>
  
<head>
    <title> Primer CSS Flexbox Flex </title>
    <link rel="stylesheet" href=
          "https://unpkg.com/@primer/css@^18.0.0/dist/primer.css" />
</head>
  
<body>
    <h1 class="color-fg-success text-center">
        GeeksforGeeks
    </h1>
    <h4 class="text-center font-bold">
        Primer CSS Flexbox
    </h4>
  
    <strong>Flexbox row</strong>
    <br>
    <div class="border d-flex flex-column flex-sm-row">
        <div class="p-5 border color-bg-subtle">Item 1</div>
        <div class="p-5 border color-bg-subtle">Item 2</div>
        <div class="p-5 border color-bg-subtle">Item 3</div>
        <div class="p-5 border color-bg-subtle">Item 4</div>
        <div class="p-5 border color-bg-subtle">Item 5</div>
    </div>
</body>
  
</html>

Output:

 

 

Example 2:




<!DOCTYPE html>
<html>
  
<head>
    <title> Primer CSS Flexbox Flex </title>
    <link rel="stylesheet" href=
"https://unpkg.com/@primer/css@^18.0.0/dist/primer.css" />
</head>
  
<body>
    <h1 class="color-fg-success text-center">
        GeeksforGeeks
    </h1>
    <h4 class="text-center font-bold">
        Primer CSS Flexbox
    </h4>
  
    <strong>Flexbox row</strong>
    <br>
    <div class="border d-flex flex-column flex-sm-row">
        <div class="p-5 border color-bg-subtle">
            An interview-centric course designed to prepare you 
            for the role of SDE for both product and service based
            companies. A placement preparation pack built with years 
            of expertise.Prepare C++, Java, DSA, CS Theory concepts
            and much more!
        </div>
        <div class="p-5 border color-bg-subtle">
            An interview-centric course designed to prepare you 
            for the role of SDE for both product and service based
            companies. A placement preparation pack built with years 
            of expertise.Prepare C++, Java, DSA, CS Theory concepts
            and much more!
       </div>
        <div class="p-5 border color-bg-subtle">
            An interview-centric course designed to prepare you 
            for the role of SDE for both product and service based
            companies. A placement preparation pack built with years 
            of expertise.Prepare C++, Java, DSA, CS Theory concepts
            and much more!
      </div>
        <div class="p-5 border color-bg-subtle">
            An interview-centric course designed to prepare you 
            for the role of SDE for both product and service based
            companies. A placement preparation pack built with years 
            of expertise.Prepare C++, Java, DSA, CS Theory concepts
            and much more!
       </div>
        <div class="p-5 border color-bg-subtle">
            An interview-centric course designed to prepare you 
            for the role of SDE for both product and service based
            companies. A placement preparation pack built with years 
            of expertise.Prepare C++, Java, DSA, CS Theory concepts
            and much more!
      </div>
    </div>
  
</body>
  
</html>

Output:

 

 

Reference: https://primer.style/css/utilities/flexbox#flexbox-bugs


Article Tags :