W3C home > Mailing lists > Public > www-style@w3.org > January 2009

unit expander (was: Disadvantages of ch unit)

From: Josef Schmid <e9427749@student.tuwien.ac.at>
Date: Mon, 12 Jan 2009 21:10:38 +0100
Message-ID: <496BA3BE.7010903@student.tuwien.ac.at>
To: www-style@w3.org
CC: Brad Kemper <brad.kemper@gmail.com>, Giovanni Campagna <scampa.giovanni@gmail.com>


Brad Kemper schrieb:
> On Jan 9, 2009, at 12:34 PM, Josef Schmid wrote:
>>> 3) you're introducing two syntax keywords (of and from)
>> yes, and? Instead of 'ch', 'rem' and many other that will
>> follow.
For me this was a argument, how much a web developer must
learn and what power he get for this.

> "ch" and "rem" and other measurement units are interpreted as such when 
> they have a number before them, not a space.

yes, so the possible _values_ for CSS-properties are a little bit
restricted, so the parser is allowed to assume that it is a
value-extender (because of the space).
Neither selectors nor the names of properties are affected.

> There may be existing CSS out in the wild that styles XML with "of" and 
> "from" being used as simple selectors for "of"and "from" XML elements.

Yes of course.
But why you think that this has anything to do with my proposal?

Eg. <doc>
     <from class="from" id="from">foo
     <later_in_stream id="there">bar</later_in_stream>

     from.from#from { .... }
     { font-size: 1em from (doc #from);
       with: 50% from :root;

The price is only that for css-properties simple values called 'from'
are not allowed one second an beyond argument position, when
the values before can have a expandable value.

So disallowing some-css-property: from; are more as enough.
(The whole thing does only effect stuff on the right side of ':'.)
At least i think that it can work that way.


Alternatively a postfix syntax without this restriction:

     { font-size: 1em-from (doc #from);
       with: 50%-from :root;


Received on Monday, 12 January 2009 20:12:08 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:23 UTC