![]() |
VOOZH | about |
Primer CSS is a free open-source CSS framework built with the GitHub design system to support the broad spectrum of Github websites. It creates the foundation of the basic style elements such as spacing, typography, and color. This systematic method ensures our patterns are steady and interoperable with every other. Object-oriented CSS principles, functional CSS, and BEM architecture influence its approach to CSS. It is a highly reusable model.
Primer CSS variables are a way to store information that you can reuse later. In that case, the work will be easy and there is no need to define the CSS property repeatedly.
The typographical variables that are used in the Primer CSS are listed below:
Layout Variables:
Misc Variable:
Other Variable:
Example 1: In the above code, we will make use of the above variables to demonstrate the use of variables.
SCSS code:
$border-width: 2px solid green;
.gfg {
border:$border-width;
}
Compiled CSS Code:
.gfg {
border: 2px solid green;
}
Output:
Example 2: In the above code, we will make use of the above variables to demonstrate the use of variables.
SCSS Code:
$h0-size: 40px;
h3{
font-size:$h0-size;
}
Compiled CSS Code:
h3 {
font-size: 40px;
}
Output:
Reference: https://primer.style/