HighDots Forums  

CCSS (Cascading Cascading Style Sheets)

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss CCSS (Cascading Cascading Style Sheets) in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
pp
 
Posts: n/a

Default CCSS (Cascading Cascading Style Sheets) - 08-29-2004 , 10:31 AM






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; }
A B D:hover {css-propertieshover; }
---

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:hover {css-propertieshover; }
}
}
---

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.


Reply With Quote
  #2  
Old   
Els
 
Posts: n/a

Default Re: CCSS (Cascading Cascading Style Sheets) - 08-29-2004 , 12:05 PM






pp wrote:

Quote:
What would you say about a smart script that would
transform really 'cascading' style sheet into appropriate
CSS structures.
See below.

Quote:
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; }
A B D:hover {css-propertieshover; }
---

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:hover {css-propertieshover; }
}
}
---
Not too much more work.

Quote:
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.

Quote:
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.

Quote:
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.

Quote:
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 -


Reply With Quote
  #3  
Old   
Harlan Messinger
 
Posts: n/a

Default Re: CCSS (Cascading Cascading Style Sheets) - 08-30-2004 , 11:58 AM




"pp" <exit (AT) gazeta (DOT) pl> wrote

Quote:
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; }
A B D:hover {css-propertieshover; }
---

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:hover {css-propertieshover; }
}
}
I'd get lost in a hurry, trying to keep the above straight.

Quote:
Certainly, this example is fairly simple, but more complex ones would
require an overhelming amount of typing.
I'd get even more lost.

Quote:
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/

Quote:
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.



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.