![]() |
VOOZH | about |
Primer CSS is a free open-source CSS framework that is built with the GitHub design system to provide support to the broad spectrum of Github websites. It creates 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 a highly reusable model.
Primer CSS Flexbox Responsive Flex utilities provide a flexible and responsive one-dimensional layout model that has efficient layouts with distributed spaces among items within a container. They are useful for creating small-scale layouts and are responsive and mobile-friendly adjusting their alignment structure too. Proper spacing, order, and sequencing of items are also taken care of.
Primer CSS flexbox utilities can be adjusted for all breakpoints sm (min-width: 544px), md (min-width: 768px), lg (min-width: 1004px), xl (min-width: 1280px) for various flex properties.
Example classes:
Syntax:
flex-[breakpoint]-[property]-[behavior]
Note: Each responsive style is applied to the specified breakpoint.
Example 1: The following code demonstrates the flex-sm-self-stretch class for Primer CSS Responsive Flex utility. The first box is self-stretched due to the class.
Output:
Example 2: The following code demonstrates the flex-lg-nowrap class for Primer CSS Responsive Flex utility. Refer to the output for the no-wrap utility.
Output:
Example 3: The following code demonstrates the flex-sm-wrap class for Primer CSS Responsive Flex utility where the boxes are wrapped in the main container.
Output:
Reference: https://primer.style/product/css-utilities/#responsive-flex-utilities