Re: [css3] CSS3 Syntax

Hello,

Le 12 déc. 06 à 09:21, Sebastian Gräßl a écrit :
> For a long time now i have the idea of an Syntax change in CSS.
> I think it should be more like a DOM-Tree.
> In fact it should only have the ability to write definitions in  
> defintitions.
> A short Example:
>
> ul {
>    li {}
> }
>
> but it should be still possible, and that's something important to  
> slowly introduce it, to write:
>
> ul li {}
>
> and overwrite the definition of a li in an ul.
>
> Why do i think it is a good idea?
>
> 1) Well, i work at a shop where lot's of XML stuff get's done an  
> teammates who have to work with/on my CSS don't quitly, in fact  
> they hardly understand selectors like:
>
> #menu ul li ul li ul {}
>
> 2) It helps (or forces) you to better design your CSS, which helps  
> you also to debug your code.
>     I often have the bad habbit, that when i have to hurry i simply  
> add a definition somweher in my CSS.
>
> 3) File size. i have two stylesheet attached, one with ordinary  
> syntax and one with the nested syntax.

Was there supposed to be an attachment? I did not received anything.

For the rest, I like the idea (especially point 1) but:

CSS is based on “levels” (some people, no name mentioned, expressed  
how the “level” idea is a posteriori a wrong one, since it  
increasingly limits CSS - still, it is there). Levels mean that older  
parsers will just ignore new rules, but that old rules will still be  
readable. By changing the syntax, your proposal breaks this...

...Except if you can do some content-negociation based on the CSS  
level the UA recognises. I'm know very few of XML, but the way I see  
it, it is impossible to use XSLT to transform CSS “new-syntax” to CSS  
“old-syntax”. Good news is that, *maybe*, this is not necessary and  
another string-replacement language will suffice.

Any input, someone?
-- 
</david_latapie>
http://blog.empyree.org/   U+0F00

Received on Wednesday, 13 December 2006 08:53:05 UTC