Q&A

Q1:This chapter has suggested creating a class for every style declaration. This would seem to create a long style sheet to accommodate every possible declaration. Are other methods possible?
A1: Certainly. The author has made this suggestion based on his experience developing SVG with a team of developers. Other methods are possible and equally beneficial (if not more, in some cases), and you are encouraged to code your style sheets in a fashion that best suits your team and work environment. In some cases, grouping several declarations into one class can be quite helpful. For instance, if you were to create a class labeled “errormsg” to style text that appeared whenever a user did something wrong, you could place several declarations inside ...

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.