W3C home > Mailing lists > Public > www-style@w3.org > January 2012

[css3-text] <spacing-limit> incompatible with calc due to different treatment of lengths and %s

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 5 Jan 2012 11:28:15 -0800
Message-ID: <CAAWBYDARiTc=SvK16KTV_mw2rhNu-mjQprdHzguS0ioMWhcFPQ@mail.gmail.com>
To: www-style list <www-style@w3.org>
The <spacing-limit> type defined for 'word-spacing' in Text 3
<http://dev.w3.org/csswg/css3-text/#spacing-limit> assigns
substantially different meanings to percentages and lengths - the
former sets the word spacing to the given value, while the latter
*increments* the word spacing by the given value.

If calc() is used here and mixes %s and lengths, like "calc(50% +
1ch)", what does this mean?  If I'm reading correctly, I think this
would result in a <length> equal to 1ch + half the default word
spacing, making the total word spacing equal to 1ch + 150% the
default.  Is this intended?

If so, this seems suboptimal, as it's then impossible to, say, use
calc() to set the word-spacing to a particular length.  (I had
expected "calc(0% + 1ch)" to kinda work like that.)  Perhaps we can
alter word-spacing to accept both a percentage and a length, and
combine their effects?

~TJ
Received on Thursday, 5 January 2012 19:29:04 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:48 GMT