Re: [css3-*] Review of functional syntax in CSS

On Fri, Jan 20, 2012 at 4:04 PM, Alex Mogilevsky <alexmog@microsoft.com> wrote:
> ± From: fantasai [mailto:fantasai.lists@inkedblade.net]
> ± Sent: Friday, January 20, 2012 12:55 AM
> ±
> ± > You don't mention 'flex()'. Are you two in agreement it doesn't need to
> ± be a function, or are you OK with it either way (if it lives, the syntax
> ± is good)?
> ±
> ± We agree the syntax is good. :)
>
> OK
>
> ± >     2) Are there other places where use of a function changes defaults
> ± (such as "width:flex(1)" implies "width:0" instead of "width:auto")?
> ±
> ± It doesn't actually imply width: 0, does it? I thought it implies that the
> ± preferred width argument of the flex() function is 0.
> ± That's not the same thing.
>
> Actually the problem is using "width:flex(1)" outside flexbox. It can't be ignored because it is valid, then it has to mean something (as discussed earlier). It could mean "auto" or it could mean "use the preferred width", which in this case is 0 -- the different default I am talking about...

Similarly, though, "width: attr(no-such-attribute px);" is also valid,
and also evaluates to "width: 0px;".

On the specific subject of flex(), though, we certainly *could*
interpret it as "auto" *regardless of the value of the function* when
it was used outside of a flexbox.  I don't care much either way.  Can
we move this discussion over to a thread dedicated to flexbox?

~TJ

Received on Saturday, 21 January 2012 00:14:10 UTC