SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Sep 2004
    Location
    UK
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Grouping child selectors together

    I want to be able to group child selectors together underneath their parents. I think it's going to be easiest to explain with an example.
    At the moment I have this.
    PHP Code:
    #list ul.list li.dico, #list ul.list li.pico {
      /*some stuff for dico & pico*/
    }

    #list ul.list li.dico {
      /*stuff for dico*/
    }

    #list ul.list li.pico {
      /*stuff for pico*/
    }

    #list ul.list li.nico {
      /*stuff for nico*/

    What I would like to do is simplify the selectors for the first ruleset, prehapse something like this

    PHP Code:
    #list ul.list li.[(dico|pico)] {
      /*stuff for dico & pico*/

    So, I keep the fact that it must be in #list ul.list but don't have to repeat it, see?

    Answers on a postcard

    Cheers
    Bubble

  2. #2
    SitePoint Wizard megamanXplosion's Avatar
    Join Date
    Jan 2004
    Location
    Kentucky, USA
    Posts
    1,099
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  3. #3
    SitePoint Member
    Join Date
    Sep 2004
    Location
    UK
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Oh well, thanks for the info. Here's hoping pattern matching support is considered for future specs.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •