![]() |
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 Extended Negative Margins. Primer CSS Extended Negative Margins are used to provide extended negative margins to the top and bottom of an item and its range is from 1 to 12.
Extended Negative Margins Used Class:
Syntax:
<div class="m[direction]-n[spacer]"> Content </div>
Negative margins can also be used responsively based upon breakpoints.
Syntax:
<div class="m[direction]-[breakpoint]-n[spacer]" > Content </div>
Example 1: In this example, we will show negative margins in the bottom direction.
Output:
Example 2: In this example, we will show negative margins in the top direction.
Output:
Reference: https://primer.style/product/css-utilities/#extended-negative-margins