Skip to content

Commit e84ff73

Browse files
committed
Merge pull request #18 from valgaze/patch-1
[Fix] Styling SVGs
2 parents e69c045 + bd0e340 commit e84ff73

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

z01-web-standards.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,10 @@ 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 select it then set `background-color: red` but to get the same effect on an SVG rectangle you would instead use the attribute `fill: red` since an SVG rect doesn't respond to `background-color` for styling.)
154+
154155

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

0 commit comments

Comments
 (0)