Style Sheet Organization

In Hour 6, you learned how to organize your style sheets by grouping together similar styles, thus making it easier to find, add, or edit related classes. It also created a system that was easy to duplicate between documents, allowing anyone editing or reviewing your document to determine a class's name without having to root through the actual style sheet.

Your SVG files will likely contain numerous selectors. If your styles are not organized, it becomes difficult to quickly scan over a list of selector names and discern the style appropriate for a specific use.

To alleviate such issues, you can group style rules according to their function. In Hour 6, the instance was given where you had a style sheet with ten classes ...

Get Sams Teach Yourself SVG in 24 Hours now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.