- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Fri, 6 Jan 2012 08:02:05 -0800
- To: Stephen Zilles <szilles@adobe.com>
- Cc: "fantasai.lists@inkedblade.net" <fantasai.lists@inkedblade.net>, "www-style@w3.org" <www-style@w3.org>
On Thu, Jan 5, 2012 at 8:58 PM, Stephen Zilles <szilles@adobe.com> wrote: > Tab, > Apologies for a top post > > I do not see your problem. To me 150% is equivalent to 1.5ch. So, 1.5ch+150% > is equivalent to 1.5ch+1.5ch. That is, both values return a length and > lengths add. Why do you think this does not make sense? The issue is that plain percentages are *not* treated as lengths (they don't add to the default word-spacing, they add to 0), but percentages in calc() are turned into lengths. For a somewhat simpler example that illustrates my point, "word-spacing: 50%" gives .5 times the default word spacing, while "word-spacing: calc(50%);" gives 1.5 times the default word spacing. We should avoid this kind of behavior inconsistency when possible, which means either (a) changing word-spacing to give %s and lengths the same behavior, possible with a keyword to switch between the two types of behavior or something, or (b) change calc() to make percentages be a returnable unit type. (Note that B doesn't fix my earlier example, but it does at least ensure that wrapping a value in calc() doesn't change the behavior. Another problem with this behavioral inconsistency is that it's impossible to properly represent intermediate states in transitions, unless you resolve the percentage into a (possibly negative) length and work with that. ~TJ
Received on Friday, 6 January 2012 16:03:19 UTC