The only rule that applies is cascading, which works the same way even for elements that have multiple classes which are all matched by individual class selectors.
Namely if you have CSS as follows:
.c1 { display: inline-block; }
.c2 { display: none; }
... where the selectors .c1
and .c2
have the same specificity, then the display
declaration that comes last will take precedence, even when the same element has both classes.
Note that since the element has both classes, it will still match both rules, so any properties that don't overlap will still apply as normal:
.c1 { display: inline-block; font-weight: bold; }
.c2 { display: none; color: red; }
In this example the element will have bold and red-colored text, but its display
will resolve as none
.