I have about somewhat similar styles that each have about 6-7 lines of code that are the same, like this:
custom-style-1 {
font-size: 12px;
color: red;
//Here come the specifics!
}
custom-style-2 {
font-size: 12px;
color: red;
//Here come the specifics!
}
custom-style-3 {
font-size: 12px;
color: red;
//Here come the specifics!
}
..
..
So I wrote this and removed the repeating properties from each class:
[class*="custom-style-"],
[class*="custom-style-"] {
font-size: 12px;
color: red;
}
But then thought, why not just write another class:
.this-class-is-default-style {
font-size: 12px;
color: red;
}
and just adding it to the <div class="{list-here}">
within the html.
Which one is more expensive in terms of render time? Additionally, are there any flexibility issues or drawbacks from using a method and not the only one?