- From: Bert Bos <bert@w3.org>
- Date: Thu, 5 Apr 2012 15:18:06 +0200
- To: "Kang-Hao (Kenny) Lu" <kennyluck@csail.mit.edu>
- Cc: www-style@w3.org
Hello Kenny,
On Tuesday 06 March 2012 23:52:45 Kang-Hao (Kenny) Lu wrote:
> (Editorial)
[...]
> Here's my story. I was reading this part of the section
>
> # If two values are given and at least one value is not a keyword,
> # then the first value represents the horizontal position (or
> offset)
> # and the second represents the vertical position (or
> offset).
>
> and I pondered what "and at least on value value is not a keyword" is
> there for for 30 minutes. I realized this is for excluding value in
> [[top|bottom] [left|right|center] | center [left|right]] only after
> bumping into this thread. This sentence, as it is, has two issues
>
> 1. It doesn't describe what should happen when the value consists of
> two keywords, even for 'left top', which also satisfies "the first
> value represents the horizontal position (or offset) and the second
> represents the vertical position (or offset)".
>
> 2. It doesn't exclude values like 'top 10%', which meets the "at
> least one value is not a keyword" condition but not the grammar.
>
> Technically issue 1. is solved by later description of the keywords
> and issue 2. is covered by the grammar, but having information
> spread out in different places makes this hard to read. Therefore, I
> suggest we
>
> A. Revise this sentence into something like
>
> | If two values are given, the first value represents the
> | horizontal position (or offset) and the second represents the
> | vertical position (or offset), unless one of these is ‘left’,
> | ‘right’, ‘top’ or ‘bottom’, which always represents a
> | predefined dimension (see below).
We took your text and made it even easier to read (we believe):
If two values are given, a length or percentage as the first value
represents the horizontal position (or offset) and a length or
percentage as the second value represents the vertical position (or
offset).
> to address issue 1.
>
> B. Bring [ left | center | right ] && [ top | center | bottom ] back
> to the grammar or add an informative note:
> | Note that 'top left' is valid while 'top 0%' is not.
>
> immediately after to address issue 2. (I actually like the original
> proposal[1] better as it separates out 3-value cases involving
> 'center', but well...)
We added an informative note (and did not change the grammar):
Note that a pair of keywords can be reordered while a combination of
keyword and length or percentage cannot. So ‘center left’ is valid
while ‘50% left’ is not.
> [1] lists.w3.org/Archives/Public/www-style/2011May/0686
We hope this is satisfactory.
For the CSS WG,
Bert
--
Bert Bos ( W 3 C ) http://www.w3.org/
http://www.w3.org/people/bos W3C/ERCIM
bert@w3.org 2004 Rt des Lucioles / BP 93
+33 (0)4 92 38 76 92 06902 Sophia Antipolis Cedex, France
Received on Thursday, 5 April 2012 13:18:44 UTC