Currently, I am in the process of creating my own CSS library or framework. However, I have encountered an issue where all 10 li
tags share the same classes, such as
.pl{ padding-left:10px} .mr{ margin-right:10px}
, along with other necessary attributes. What approach should I take? Should I create a class that contains all these attributes and assign it to each li
like this:
.list-item{
margin-right:10px;
padding-left:10px;
}
<li class="list-item"/>
Alternatively, should I give each li
tag the required attributes individually by doing this:
<li class="mr-10 pl-10"/>
It is important to note that if I choose the first approach, the usage of the library will be significantly lower compared to the second option.
(My library consists of a CSS file that contains various class names for specific attributes such as .mr-10 => margin-right:10px
and so on)