Skip to content

Commit f9ad04c

Browse files
committed
[Fix] Styling SVGs
Add example sentence to be more explicit that SVGs need to be styled using SVG-specific attributes
1 parent e69c045 commit f9ad04c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

z01-web-standards.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,9 @@ SVG (Scalable Vector Graphics) is an XML format used for
148148
drawing. You can think of SVG in a lot of the same terms as the DOM -- there are elements with parents and
149149
children and attributes, and you can respond to the same mouse/touch events.
150150

151-
Even CSS styles can apply to SVG elements. The CSS attribute names for SVG
151+
Even CSS styles and selectors can apply to SVG elements. The CSS attribute names for SVG
152152
come from the SVG definition, so they are sometimes different from their
153-
HTML brethren.
153+
HTML brethren. (For example, to change the background color of a div to red you would set its "background-color" to red but to get the same effect on an SVG rectangle you would instead use the attribute "fill" since an SVG rect doesn't respond to background-color for styling.)
154154

155155
SVG defines tags for lots of basic shapes, like `<rect>` and `<circle>` and `<line>`.
156156

0 commit comments

Comments
 (0)