Re: [CSS3] Flexible Flow Module, proposal.

Zack Weinberg wrote:
> Andrew Fedoniouk <news@terrainformatica.com> wrote:
>> How is
>>
>>    width: calc(100px + 1fl);
>>
>> different from
>>
>>    width: 1fl;
>>    min-width: 100px;
> 
> It may or may not be semantically different; I claim my version is
> easier to understand.

I will claim otherwise :)

In my case:

  width: 1*;         /* make its width as large as possible */
  min-width: 100px;  /* but not less than 100px */

And how would you translate:

   width: calc(100px + 1fl);

for the human?

> 
>> I do not see how use of '*' makes syntax worse. What exactly is
>> causing problems in your opinion?
> 
> Not fitting into the DIMENSION production will cause trouble down the
> road.

{num}% does not fit into DIMENSION either.

{num}* is conceptually the same, no?


> 
>> About 'fl'. lowercase 'L' is not desirable in length units as it is 
>> close to the '1' in monospaced fonts. And 'f' belongs to hex digits -
>> may cause some inconsistencies in future.
> 
> I'm not insisting on 'fl'.  I am, however, insisting on an IDENT.
> 
>> I even would allow use of '*' without any number with the meaning that
>> '*' alone is exact equivalent of '1*'
> 
> Even worse for the grammar.

Grammar formally defined at http://www.w3.org/TR/css3-syntax/

Let's assume that we will have this line:

FLEX	::=	num '*'

here:

NUMBER	        ::=	num
PERCENTAGE	::=	num '%'
FLEX	        ::=	num '*'
DIMENSION	::=	num ident

Where and how it will make the grammar worse? And what is the metric for 
this 'worse'? What is the best? Lisp, C, Python, Perl, XML, HTML?
I am serious, that is really interesting for me.

> 
>> Allowance of '-' in names in CSS created precedent that we need to
>> deal with forever. I mean that handling of '*' is exactly the same as 
>> handling '-' as part of name token and as a minus sign.
> 
> One special case is far better than two.  Once you have two, it is
> harder and harder to argue against more.

It is not the one as you may see, percentage that is by the way
conceptually close thing is there too.

> 
> zw
> 


-- 
Andrew Fedoniouk.

http://terrainformatica.com

Received on Monday, 13 April 2009 02:30:23 UTC