![]() |
VOOZH | about |
Primer CSS is a free open-source CSS framework built upon a 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 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 labels:
Add metadata or indicate the status of items and navigational elements. Labels are small words that will tell what kind of information we are including in the webpage or what kind of input we are providing. Name label will tell the user to put their name into that field and there are three types of labels, Labels to indicate metadata, States to show the status, and Counters to indicate the count of a number of items. Issue labels are for adding labels to issues and pull requests.
Primer Label classes:
Various ways to modify labels are listed below:
Syntax:
<span class="Label Label--primary"> ... </span>
Note: Replace the above classes as per the need.
Example 1: In this example, we will set the height and width of an image using inline styles.
Output:
Example 2: In the below code, we will include the classes to issue labels.
Output:
Example 3: In the below code, we will include the classes to increase the size of the labels.
Output:
Example 4: In the below code, we will see how you can modify the label.
Output:
Example 5: The following code demonstrates the colored labels, and state labels for items.
Output:
Reference: https://primer.style/#states