470,626 Members | 2,103 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,626 developers. It's quick & easy.

CCSS (Cascading Cascading Style Sheets)

pp
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.

Jul 20 '05 #1
2 1926
Els
pp wrote:
What would you say about a smart script that would
transform really 'cascading' style sheet into appropriate
CSS structures.
See below.
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; }
}
}
---
Not too much more work.
Certainly, this example is fairly simple, but more complex
ones would require an overhelming amount of typing.
No, just copy pasting after the first line.
And the more complex, the less likely any script would know
what I meant.
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.
A simple search and replace in a colour stylesheet would
suffice.
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.
No, I haven't thought about that, actually.
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.


Not worth the hassle.
AFAICS no program will be able to guess which styles I need to
be nested, inherited or changed.
Especially the more complex stylesheets, could imo only be
messed up by such program.
And if the CSS is to be parsed, I suppose this means I have to
parse it after every little change, before I hit F5 on the
browser. More work than typing a few lines extra :-)

--
Els
http://locusmeus.com/
Sonhos vem. Sonhos v„o. O resto ť imperfeito.
- Renato Russo -
Jul 20 '05 #2

"pp" <ex**@gazeta.pl> wrote in message
news:cg********@odak26.prod.google.com...
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; }
}
}
I'd get lost in a hurry, trying to keep the above straight.
Certainly, this example is fairly simple, but more complex ones would
require an overhelming amount of typing.
I'd get even more lost.

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.
It's been done, though it's complicated. See the CSS DOM recommendation at

http://www.w3.org/TR/DOM-Level-2-Style/

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.


Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

31 posts views Thread by Axel Dahmen | last post: by
2 posts views Thread by Herb Stull | last post: by
5 posts views Thread by JezB | last post: by
1 post views Thread by Fred Nelson | last post: by
5 posts views Thread by Peter Walburn | last post: by
9 posts views Thread by Radium | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.