I wonder when and how I need to classify my duplicated attributes. Consider for readable, code performance, disadvantages and advantages between structure. Let say I have two CSS code :
1st Code :
.a {
text-align: center;
font-size: 1em;
background-color: red;
}
.b {
text-align: center;
font-size: 1em;
background-color: green;
}
.c {
text-align: center;
font-size: 2em;
background-color: blue;
}
.d {
background-color: blue;
}
2nd Code :
.a,
.b,
.c {
text-align: center;
}
.a,
.b {
font-size: 1em;
}
.c,
.d {
background-color: blue;
}
.a {
background-color: red;
}
.a {
background-color: green;
}
.c {
font-size: 2em;
}
So which one is better guys, Thanks a lot before :)