473,394 Members | 1,946 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

logistical/syntactical help

Does CSS contain any way to approximate what the following psudo-example is
trying to accomplish?

..ChangeTheSomeClassColorInOnePlace
{
color: #C01091;
}

..SomeClass_One
{
color: ChangeTheColorInOnePlace.color;
}

..SomeClass_Two
{
color: ChangeTheColorInOnePlace.color;
}

I'm trying to avoid having to do this:

..SomeClass_One
{
color: #C01091;
}

..SomeClass_Two
{
color: #C01091;
}

..SomeClass_Three
{
color: #C01091;
}

....etc

There are many iterations of "someclass" within the sheet, changing the
common color among them all becomes a tedious cut & paste exercise I would
like to avoid if it can be avoided. The elements that are assigned to these
classes are not nested under a common parent within the html (other than
html/body, which requires a color attribute other than #C01091). How is
this commonly accomplished? Thanks.
Jul 21 '05 #1
4 1232
Workgroups wrote:
Does CSS contain any way to approximate what the following psudo-example is
trying to accomplish?

.ChangeTheSomeClassColorInOnePlace
{
color: #C01091;
}

.SomeClass_One
{
color: ChangeTheColorInOnePlace.color;
}

.SomeClass_Two
{
color: ChangeTheColorInOnePlace.color;
}

I'm trying to avoid having to do this:

.SomeClass_One
{
color: #C01091;
}

.SomeClass_Two
{
color: #C01091;
}

.SomeClass_Three
{
color: #C01091;
}

...etc

There are many iterations of "someclass" within the sheet, changing the
common color among them all becomes a tedious cut & paste exercise I would
like to avoid if it can be avoided. The elements that are assigned to these
classes are not nested under a common parent within the html (other than
html/body, which requires a color attribute other than #C01091). How is
this commonly accomplished? Thanks.


.SomeClass_One, .SomeClass_Two, .SomeClass_n
{ color: #c01091 }

.SomeClass_One
{ /*set some other attributes */ }

.SomeClass_Two
{ /*set some other attributes */ }
....

--
Rob
Jul 21 '05 #2

"RobG" <rg***@iinet.net.auau> wrote in message
news:J7****************@news.optus.net.au...

.SomeClass_One, .SomeClass_Two, .SomeClass_n
{ color: #c01091 }

.SomeClass_One
{ /*set some other attributes */ }

.SomeClass_Two
{ /*set some other attributes */ }
...


Thanks for the help.
Jul 21 '05 #3

"RobG" <rg***@iinet.net.auau> wrote in message
news:J7****************@news.optus.net.au...
.SomeClass_One, .SomeClass_Two, .SomeClass_n
{ color: #c01091 }

.SomeClass_One
{ /*set some other attributes */ }

.SomeClass_Two
{ /*set some other attributes */ }


Could the following also be somehow realized through CSS?

..PaintBucketA
{
color: #111111;
background: #FFFFFF;
}

..PaintBucketB
{
color: #761D20;
background: #00000;
}

..SomeClass_One, .SomeClass_Two, .SomeClass_n
{
border: solid 2px PaintBucketA.background;
color: PaintBucketA.color;
}

..SomeClass_Two
{
border-top: solid 2px PaintBucketB.background;
}

..SomeClass_Three
{
background: PaintBucketB.color;
}

and so on
Jul 21 '05 #4
*Workgroups* <no*****@domainless.com>:

Could the following also be somehow realized through CSS?

[Color variables/references]


No (and probably never will), use a preprocessor.

--
The English language is the result of Norman soldiers
trying to set up dates with Saxon barmaids.
---
A polar bear is a rectangular bear after a coordinate transform.
Jul 21 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
by: Dave | last post by:
After following Microsofts admonition to reformat my system before doing a final compilation of my app I got many warnings/errors upon compiling an rtf file created in word. I used the Help...
9
by: Tom | last post by:
A question for gui application programmers. . . I 've got some GUI programs, written in Python/wxPython, and I've got a help button and a help menu item. Also, I've got a compiled file made with...
4
by: Sarir Khamsi | last post by:
Is there a way to get help the way you get it from the Python interpreter (eg, 'help(dir)' gives help on the 'dir' command) in the module cmd.Cmd? I know how to add commands and help text to...
2
by: Sudheer Kareem | last post by:
Dear All Please tell me how to assosiate help files with my Vb.net Project. Regards Sudheer
6
by: wukexin | last post by:
Help me, good men. I find mang books that introduce bit "mang header files",they talk too bit,in fact it is my too fool, I don't learn it, I have do a test program, but I have no correct doing...
4
by: C L Humphreys | last post by:
Hi, I can't work this out, as it seems to work in the vba immediate window but not in a query. The following gives an invalid procedure call error: select * from addresses where address4 =...
2
by: niels.froehling | last post by:
Hy; I converted the tables (for _tabular_ :) data) in a project from the plain <table><tr><td></td></tr></table> structure to seperation into head/foot/body divisions (not the <div>-element)....
9
by: =?Utf-8?B?TmVpbEdvdHQ=?= | last post by:
I am trying to format a decimal number such as 0.0567 but forgot how to do formatting in C#. I tried the old C format escape sequence "\8.3f" the old C style but does not work. example:...
5
by: truptivk | last post by:
Hello all, I have a question and I'd be glad if any of you could help me :) I have written code to add rows dynamically to an existing table. When the user first comes to the page, there are 2...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...

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.