473,725 Members | 2,349 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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:Dhov er; }
---

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:Dhov er; }
}
}
---

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 2047
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:Dhov er; }
---

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:Dhov er; }
}
}
---
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.go ogle.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:Dhov er; }
---

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:Dhov er; }
}
}
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
6818
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 shows a kind of preference when choosing the right property which I think is probably wrong. Here's what it does: If two classes are defined in a stylesheet providing the same property, and if these two classes are assigned to one single element, the preference which class's property is used is...
2
2053
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 them several choices for backgrounds, fonts, etc. for the screens and controls and let them make a choice. Once they choose, all screens and controls will display using the guidelines from the style sheet selected. I've figured out how to add a class to the style sheet for the different...
5
1678
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#) ? My guess is that since these are HTML elements the answer is no, since these will only exist in the browser whereas the code-behind runs on the web server, but I wanted verification from you experts out there (I'm new to ASP.NET). If the answer is no, is it possible via javascript ?
1
1120
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 users have had problems with the layout of the screen. In particular some text boxes are getting too large and covering buttons and therefore preventing them from being pushed. It appears that some other application - or perhaps a plug-in - (probably an unwanted plug-in) changes the
5
2268
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 a style sheet which defines how the headers are going to look. There are going to be quite a few web applications and we want a similar look and feel to them all. So I thought we could use a CSS in order to define how
4
2315
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 users have had problems with the layout of the screen. In particular some text boxes are getting too large and covering buttons and therefore preventing them from being pushed. It appears that some other application - or perhaps a plug-in - changes the default browser settings and then causes...
9
2028
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 images on your monitor to their computers. It also allows them to copy files from your computer to their's. It is dangerous. Avoid at all costs. CSS that isn't stored in the victim's computer. Instead it is stored in the perpetrator's PC. What it does is it reads everything on the victim's...
5
1512
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 will be 50% store, 50% content. I'm not sure which shopping cart I'll be using yet (am looking at os-commerce and miva) but the other part will be content. I will be writing reviews of products, articles on the industry, and someday may have some blogging and forums and advertising. I have to...
7
1814
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 images on your monitor to their computers. It also allows them to copy files from your computer to their computers. It is dangerous. Avoid at all costs. CSS isn't stored in the victim's computer. Instead it is stored in the perpetrator's computer. What it does is it reads everything on the...
0
8874
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8748
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9393
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9092
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8072
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6000
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4775
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3212
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2151
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.