css selector as alias of another

Discussion in 'HTML' started by JakDaniel, Mar 28, 2007.

  1. JakDaniel

    JakDaniel Guest

    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
    JakDaniel, Mar 28, 2007
    #1
    1. Advertising

  2. 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?

    --
    Jukka K. Korpela ("Yucca")
    http://www.cs.tut.fi/~jkorpela/
    Jukka K. Korpela, Mar 28, 2007
    #2
    1. Advertising

  3. JakDaniel

    Andy Dingley Guest

    On 28 Mar 2007 09:16:22 -0700, "JakDaniel" <>
    wrote:

    >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.
    Andy Dingley, Mar 28, 2007
    #3
  4. JakDaniel

    Chris Beall Guest

    Chris Beall, Mar 31, 2007
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. www.raph.nl
    Replies:
    0
    Views:
    541
    www.raph.nl
    Oct 3, 2003
  2. Replies:
    9
    Views:
    2,573
    mbstevens
    Jul 23, 2006
  3. rodchar

    css selector

    rodchar, Apr 3, 2008, in forum: ASP .Net
    Replies:
    2
    Views:
    375
    rodchar
    Apr 3, 2008
  4. grocery_stocker
    Replies:
    9
    Views:
    732
    grocery_stocker
    May 24, 2008
  5. Kenneth McDonald
    Replies:
    6
    Views:
    1,757
    Mark Thomas
    Dec 30, 2008
Loading...

Share This Page