arrow_back
Back

Attributes

Andrew Dorokhov Andrew Dorokhov schedule 1 min read
menu_book Table of Contents

We can apply the fill, stroke, and stroke-width attributes for every shape in SVG.

CSS

If we set attributes using CSS we should understand that not every attribute is inherited to its children.

For example, fill, stroke, and stroke-width aren’t inherited down the DOM structure.

But we can force inheritance for any CSS property by setting the property’s value on the child element to inherit. But there’s usually a logical reason why certain properties don’t inherit.

code

Need Help with Development?

Happy to help — reach out via the contacts or go straight to my Upwork profile.

work View Upwork Profile arrow_forward
Next Article

Drawing text

arrow_forward