472,341 Members | 2,125 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,341 software developers and data experts.

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 1978
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

31
by: Axel Dahmen | last post by:
I try to combine properties of several classes. This is done by assigning a space separated list of class definitions to an element. However, IE...
2
by: Herb Stull | last post by:
I'm trying to give users a choice of the visual interface used in my ASP.NET application using Cascading Style Sheets. Ideally I'd like to offer...
5
by: JezB | last post by:
Is it possible to programatically examine and modify a page's Styles (including Cascading Style Sheets) within the code-behind-module (eg. c#) ? ...
1
by: Fred Nelson | last post by:
Hi: I have a VB.NET web application that has been running just fine for several months without any cascading style sheets. Suddenly several...
5
by: Peter Walburn | last post by:
Hi, I am writing a web based application in VB.Net. A lot of the forms in the applicaiotn have grids (datagrids) in them. I would like to have...
4
by: Fred Nelson | last post by:
Hi: I have a VB.NET web application that has been running just fine for several months without any cascading style sheets. Suddenly several...
9
by: Radium | last post by:
Cascading Style Sheet is an extreme hazard to your privacy. It allows others on the internet to see your monitor and files. It allows them to copy...
5
by: MarkW | last post by:
I hope this is the correct place to post this: I am developing a web site for a e-commerce business I will be running. The site I'm setting up...
7
by: Green Xenon [Radium] | last post by:
Cascading Style Sheet is such a hazard to your privacy. It allows others on the internet to see your monitor and files. It allows them to copy...
0
better678
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
0
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: CD Tom | last post by:
This only shows up in access runtime. When a user select a report from my report menu when they close the report they get a menu I've called Add-ins...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.