![]() |
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 be seeing Primer CSS Uniform Margins. Margin utility provided by Primer CSS helps developers to write less custom CSS and helps to achieve many different page layouts using the same styles. Uniform margin utilities are used to apply equal margin to all sides of an element. The uniform margin utilities override default margins and can be used with a spacing scale of 0 to 6.
Primer CSS Uniform Margins Classes:
Syntax:
<div class="m-3"> ... </div>
Example 1: The example below shows the use of uniform margin classes listed above.
Output:
Example 2: The example below shows how using uniform margin classes overrides the default or pre-applied margin on the element.
Output:
Reference: https://primer.style/product/css-utilities/#uniform-margins