Last week I showed you how to create SVG text using the
<text> element. In the examples I added x and y coordinates to position the text and the individual characters in a string of SVG text. There’s more to the
Think of all the times you might add the same color to different elements or classes in your CSS file and then think of all the fun you have changing everything when you decide another color would work better. Wouldn’t you prefer to make the change once and have the rest update automatically?
Nesting can be a good way to organize your Sass code. It can also lead to specificity problems if you nest too deeply. You don’t have to look to far to find people who’ll tell you how wonderful nesting is or how the universe might cave in on itself if you attempt to nest your code.
The truth as usual is somewhere in between the extremes.
Do you want to write CSS that’s well organized, easier to read, and easier to maintain? Nesting is a feature of Sass that can help you keep related selectors and properties together to make your code more readable and maintainable.