- From: Brian Manthos <brianman@microsoft.com>
- Date: Tue, 14 Sep 2010 20:23:10 +0000
- To: fantasai <fantasai.lists@inkedblade.net>
- CC: Tab Atkins Jr. <jackalmage@gmail.com>, Sylvain Galineau <sylvaing@microsoft.com>, "www-style@w3.org" <www-style@w3.org>
Am I misunderstanding, or is the proposal that all querying for style in other fashions (i.e. not with computed style) should never include the keyword 'center' in the output? Should 'left', 'top', 'right', and 'bottom' also be avoided when possible or is it a specific dislike of 'center'? Personally, I think it's wrong-headed to convert author-specified "center" to "top 50%" or "left 50%" because (a) it's conceptually different and (b) it's longer. But apparently the consensus is to move in that direction, so I just want to get clear on the mental model being adopted. - Brian > -----Original Message----- > From: fantasai [mailto:fantasai.lists@inkedblade.net] > Sent: Tuesday, September 14, 2010 11:32 AM > To: Brian Manthos > Cc: Tab Atkins Jr.; Sylvain Galineau; www-style@w3.org > Subject: Re: [css3-backgrounds] Example XV inconsistent with prose of > section 3.6 > > On 09/14/2010 02:17 AM, Brian Manthos wrote: > > What does > > Background-position: left 17px center; serialize out as? > > > > "left 17px 50%"? > > > > That seems to collide with > > "If three or four values are given, then each<percentage> or<length> > > represents an offset and must be preceded by a keyword, which specifies > from which edge the offset is given." > > > > Or are you saying center sometimes becomes 50% when serialized out, and > sometimes doesn't? > > > > Actually... > > Background-position: center right 15px; ...is a better example because > > with the left example below you can get away with "17px 50%". > > Let's take a look at the Computed Value section of the property definition: > http://www.w3.org/TR/css3-background/#the-background-position > > It says: > > # If one or two values are specified, for a <length> the absolute length, > # otherwise a percentage. If three or four values are specified, two > # pairs of a keyword plus a length or percentage. > > Further down the definition of 'center' says: > > # Equivalent to ‘50%’ (‘left 50%’) for the horizontal position if the > # horizontal position is not otherwise specified, or ‘50%’ (‘top 50%’) > # for the vertical position if it is. > > So your first example would compute to "left 17px top 50%" and your second > example would compute to "right 15px top 50%". > > ~fantasai
Received on Tuesday, 14 September 2010 20:23:51 UTC