![]() |
VOOZH | about |
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.
In this article, we will learn about Primer CSS Responsive Margins. Primer CSS Responsive Margins are used to support responsiveness towards screen size, which basically means that there will be different margins to an element when it renders on a small/medium/large/extra-large screens.
Responsive Margins used Class:
Syntax:
<div class="m[direction]-[breakpoint]-[spacer]" > Content </div>
Example 1: In this example, we will show different margins on small and large screens in x and y directions i.e both top and bottom.
Output:
Example 2: In this example, we will show different margins on small and large screens in the top and bottom directions.
Output:
Reference: https://primer.style/product/css-utilities/#responsive-margins