css selector as alias of another

J

JakDaniel

is it possible, create a selector as alias of another selector...
(maybe) in another stylesheet file?

ex:

html page
....
<link rel="stylesheet" type="text/css" href="style1.css" />
<link rel="stylesheet" type="text/css" href="style2.css" />
....
<span class="test1">test1</span>
<span class="test2">test2</span>
....

style1.css
....
test1{
font-size: 20px;
}
....

style2.css
....
test2{
# syntax to get style's information from another selector in another
stylesheet (ex: .test in style1.css file)
}
....

another way that I have found is this below...

..test_alias:.test_style{
}

..test_style{
color: #000000;
font-size: 40px;
font-weight: bold;
}

but it don't work... or my syntax is incorrect... you can help me?


thx
 
J

Jukka K. Korpela

Scripsit JakDaniel:
is it possible, create a selector as alias of another selector...

No, CSS has no such definition mechanisms. Why would you need such a
possibility?
 
A

Andy Dingley

is it possible, create a selector as alias of another selector...
(maybe) in another stylesheet file?

No.

Inventing exciting new bits of syntax for CSS doesn't work, as much as
might like it to (Unless you're Hakon Lie).

It's the wrong approach anyway. If you want to apply chunks of CSS to
multiple things, find a set of selectors that match those multiple
things.
 
C

Chris Beall

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top