Scripsit maya:
>> <div class="module-typelist module">
- -
my gosh, this is crazy.. as if all this blog-code weren't confusing
enough...
Blog code can be confusing, but this is really a _simple_ thing.
so I have to do:
.module-typelist, .module { }
to style this? (since can't change this generated code..)
No, you can use either
..module-typelist { ... }
or
..module { ... }
as you like, or both, as long as you understand that the rules apply to all
elements in the given class. Or if you really want to restrict the rule to
those elements that belong to both classes, you can use
..module-typelist.module { ... }
though this might have some limitations in browser support (sorry, I'm not
sure about this).
why use two different classes for one element?
Well, it's like saying "he is a male engineer", i.e. he belongs to the class
of engineers and to the class of male people. Rather logical, really. You
might want style an element both by the rules for one class and by the rules
for another class. Say, you make all engineers red and all male people huge
(in font). Then male engineers will look huge and red, whereas other
engineers just look red and other males just huge.
--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/