My question is simple, but I didn't found any documentation about it on Internet. Maybe I didn't search with the right keywords...
Take the example of a CSS class called centered
, it centers elements and do some other stuff.
I want to say that all the element of the class news
, for example, inherit from centered
.
There is several solutions :
Declare all the elements of
centered
innews
.centered { X; Y; Z } .news { X; Y; Z; A; B }
Declare in HTML my tags with the 2 classes :
.centered { X; Y; Z } .news { A; B }
<div class="news centered">...</div>
I search a code for doing something like this :
.centered { X; Y; Z }
.news { all_the_properties_of_centered; A; B }
then I would declare my news with
<div class="news">...</div>
Is it possible ?