What would you say about a smart script that would transform really
'cascading' style sheet into appropriate CSS structures.
When coding css by hand, most often you are forced to write the
statements separately in lines, e.g.
---
A {css-properties:A; }
A B C {css-properties:C;}
A B D {css-properties:D; }
A B D:hover {css-properties:Dhover; }
---
How about being able to write the equivalent for the above like that:
---
A {
{css-properties:A;}
B {
C {css-properties:C;}
D {css-properties:D;}
D:hover {css-properties:Dhover; }
}
}
---
Certainly, this example is fairly simple, but more complex ones would
require an overhelming amount of typing.
Another thing would be defining css variables, so that the whole color
scheme or layout could be switched instantly without a separate
stylesheet but with another variables.
The discussion how to arrange the variable assignments is naturally
open, the more important thing you may have thought about is by what
language the ccss would be transformed to regular CSS.
I wanted to start with a regular PHP4, but it may be implemented in ANY
other platform as well. Python, C (for cgi), Perl. The list is always
open. The ccss is to be parsed by few brilliant regular expressions.
Please let me know what you think.