Bug 217207
| Summary: | CSS 'all' shorthand makes SVG child elements forget various HTML attributes | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | bugmenot |
| Component: | CSS | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED INVALID | ||
| Severity: | Normal | CC: | cdumez, koivisto, sabouhallawa, simon.fraser, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
bugmenot
Steps to reproduce:
1. In HTML, create an inline SVG
2. In CSS, select the children of the SVG
3. Set the all shorthand to one of the global values (inherit, initial, unset)
Expected results:
The SVG children elements are visible and drawn as specified by their HTML attributes.
Actual results:
Multiple SVG children elements don't show up or are not drawn as specified by their HTML attributes (color, fill, stroke, etc.).
Reduced test case: https://jsfiddle.net/1c2t7o8n/
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
bugmenot
Similar bugs in Chrome and Firefox. Additionally in Chrome, the <path> element is not visible.
https://bugs.chromium.org/p/chromium/issues/detail?id=1134543
https://bugzilla.mozilla.org/show_bug.cgi?id=1668770
Radar WebKit Bug Importer
<rdar://problem/69916890>
bugmenot
Works as intended as per SVG specification:
"The presentation attributes thus will participate in the CSS2 cascade as if they were replaced by corresponding CSS style rules placed at the start of the author style sheet with a specificity of zero. In general, this means that the presentation attributes have lower priority than other CSS style rules specified in author style sheets or ‘style’ attributes."
https://www.w3.org/TR/SVG11/styling.html