In regular CSS, you need to include .linkClassin each class definition as follows:
.class1, .linkClass { ...... }
.backgroundclass, .linkClass { ...... }
.borderclass, .linkClass { ...... }
Not very good readability.
You can look at CSS preprocessors, such as LessCSS , that make this easier. Using LessCSS, you can do the following:
.linkClass {
.class1;
.backgroundclass;
.borderclass;
}
LessCSS then compiles the final stylesheet.
source
share