- From: Erik Dahlstrom <ed@opera.com>
- Date: Tue, 20 Jul 2010 15:36:59 +0200
- To: public-svg-wg@w3.org
On Tue, 20 Jul 2010 13:09:56 +0200, Erik Dahlstrom <ed@opera.com> wrote: > Forwarded on Tav's behalf for ISSUE-2351. > > ------- Forwarded message ------- > From: "Tavmjong Bah" <tavmjong@gmail.com> > Subject: Proposed changes for units. > Date: Fri, 16 Jul 2010 20:20:29 +0200 > > Re: ISSUE-2351: Clarify that units are required on <length>s in style > attribute; fix examples in text. [SVG 1.1 F2 Last Call > > > First an update on the issue: > > After some discussion on the www-svg mailing list, it can be > concluded that the examples in 6.6 are correct as the parameter > in question ('stroke-width') is not a CSS defined property and > thus does not need a unit. The example in 7.10 is wrong as > 'font-size' is a CSS defined property and its use in a 'style' > attribute requires a unit. > > Second, a proposal to clarify when units are required follows. Part of > the proposal is based on suggested text from Doug Schepers. > > Tav > > Proposed changes: > > 4.2 Basic data types > > Change <angle> section to: > > Angles are specified in one of two ways, depending upon whether > they are used in CSS property syntax or SVG presentation attribute > syntax: > > * When an <angle> is used in a stylesheet or with a property in a > 'style' attribute, the syntax must match the following pattern: > > angle ::= number (~"deg" | ~"grad" | ~"rad")? > > where deg indicates degrees, grad indicates grads and rad > indicates radians. The unit identifier may be in lower > (recommended) or upper case. > > For properties defined in CSS2 [CSS2], an angle unit identifier > must be provided. For angle values in SVG-specific properties > the angle unit identifier is optional. If a unit is not > provided, the angle value is assumed to be in degrees. > > * When an <angle> is used in an SVG attribute, the syntax must > match the following pattern: > > angle ::= number ("deg" | "grad" | "rad")? > > The unit identifier must be in lower case. > > In the SVG DOM, <angle> values are represented using SVGAngle or > SVGAnimatedAngle objects. Would be nice to get a test for this. The only two properties defined in the svg spec that use <angle> are 'glyph-orientation-vertical' and 'glyph-orientation-horizontal'. ... > 6.12 The 'style' attribute > > Add period to end of sentence in first paragraph, followed by: > > "Property declarations must follow CSS style rules thus CSS defined > properties (e.g. 'font-size') with a <length> value must include a > unit (for non-zero values). See 6.1 for a list of CSS defined > properties." I don't understand the first sentence of this new paragraph. > 7.10 Units: > > Change first line from: > > All coordinates and lengths in SVG can be specified with or without a > unit identifier. > > to: > > "All coordinates and lengths in SVG can be specified with or without a > unit identifier. (Note that CSS defined properties used in a CSS style > sheet or the 'style' attribute require units for lengths, see 6.1.)" That's not entirely true. You can specify '0' without a unit in CSS. That's the only exception though AFAIK. ... Cheers /Erik -- Erik Dahlstrom, Core Technology Developer, Opera Software Co-Chair, W3C SVG Working Group Personal blog: http://my.opera.com/macdev_ed
Received on Tuesday, 20 July 2010 13:37:35 UTC