Correct way to interpret this css statement?

This appears in my stylesheet:

.sidenote, aside{
Am I reading this correctly?
Selects all elements with class=“sidenote” and all <aside> elements.

(Calling “aside” and element doesn’t ring true…)

That’s correct
They are comma separated so it targets both of them separately wherever they are in the page.

3 Likes

For further clarification the above rule equates to this:

.sidenote {property/values here ... }
 aside {property/values here...}

Therefore if all the property/values are the same you just comma separate them instead and have one set of rules.

.sidenote, aside {property/values for the comma separated list}

2 Likes

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.