A fellow team member recently made an addition to our project.
<ol class="numbered-list list-inside" start="1">
.numbered-list
{
list-style-type: decimal;
}
.list-inside
{
list-style-position: inside;
}
Is there a problem with this code, or is it just as problematic as using inline CSS? How can I effectively communicate this to my team member?
Edit It seems like my question may have been misunderstood. Shouldn't the code look more like this instead?
<ol class="info-list" start="1">
.info-list
{
list-style-type: decimal;
list-style-position: inside;
}
The main point I'm trying to make is that class names should accurately represent the style they apply. Therefore, if you want to alter the appearance of the list, you would need to adjust the HTML (or modify the CSS to create a class name that contradicts the rule it contains).
Another edit Let me provide another example to better illustrate my question.
<p class="red">Hello</p>
.red
{
color: red;
}
Now, if you wanted to change the text color to green, do you see the issue?