CSS Question - Any way to set (eg. a font-size) to a group of styles, by linking the style to anothe

Posted by Joe on Stack Overflow See other posts from Stack Overflow or by Joe
Published on 2010-03-26T01:55:52Z Indexed on 2010/03/26 2:03 UTC
Read the original article Hit count: 130

Filed under:
|

.small_fonts{ font-size:10px; }

.fonts_blue{ color:blue; } .fonts_red{ color:red; } .fonts_green{ color:green; }

Any way to apply "small_fonts" to each of the "fonts_blue, _red, _green" w/o doing this:

.fonts_blue, fonts_red, fonts_green { font-size:10px; }

I am just trying to update my css to be more organized. I realised I don't need to define the font-size for each of the "small" fonts.

When adding the class btw... I know you can do this: class="small_fonts fonts_blue" ~ however I'm talking about combining within the css stylesheet

© Stack Overflow or respective owner

Related posts about css

Related posts about stylesheet