- From: Dirk Schulze <vbs85@gmx.de>
- Date: Tue, 10 May 2011 10:46:55 +0200
- To: www-svg List <www-svg@w3.org>
Hi, I just realized the new test case types-basic-02-f [1]. The first circle in the second line has a partly red stroke for Firefox and WebKit. <g xmlns="http://www.w3.org/2000/svg" stroke-width="20"> <circle r="40" id="swUpperCaseUnitPresAttr" stroke-width="10PX" fill="none" stroke="lime" transform="translate(100 240)"/> </g> Both, WebKit and Firefox interpret the value for stroke-with as 10px while Opera takes it as invalid data. While Opera is following the spec here [2] it makes more sense IMHO to be more tolerant, since stroke-width is a SVG attribute as well as a CSS property. The following example works for all browsers: <g xmlns="http://www.w3.org/2000/svg" stroke-width="20"> <circle r="40" id="swUpperCaseUnitPresAttr" style="stroke-width: 10PX;" fill="none" stroke="lime" transform="translate(100 240)"/> </g> This is because in the second example the CSS parser allows upper cases for units. Is it possible to use the same parsing rules for the SVG parser and CSS parser on SVG attributes that can be set by CSS? Of course for SVG it would still be necessary to extend the CSS rules for SVG specific units and values. Dirk [1] http://dev.w3.org/SVG/profiles/1.1F2/test/svg/types-basic-02-f.svg [2] http://www.w3.org/TR/SVG/types.html#DataTypeLength
Received on Tuesday, 10 May 2011 08:54:04 UTC