I’m a bit of a beginner, and I’m using :before for paragraph numbers. I have different styles for paragraphs, and I want some paragraphs to be numbered, and other paragraphs to be un-numbered. Here’s a toy example: http://jsfiddle.net/afdBk/
My question is: do you know of a way to avoid putting the same lengthy :before litany after every paragraph type I want to be numbered? Could I simply make up a selector for it (something like .pgfno), put all the styling there, and then call back to this selector in the :befores? This would make things a lot cleaner and easier to read.
Thanks.
You can assign rules to multiple selectors at once: (jsFiddle)
You can also set several classes on one single element (jsFiddle):