comprar viagra online
comprar viagra generico barato
comprar cialis generico online
comprar cialis online seguro
Why you want to use the :any() CSS selector |
Since Firefox 4 was relesed, loads of new (CSS) features were released into the wild. Ofcourse, this is a great thing, since Firefox has a rock solid place as 2nd most popular web browser. More people will actually be able to see all the nifty stuff you'll create using CSS. I recently came accross a CSS selector that was included in Firefox 4 (and is added to Webkit (nightly) as well), called the Be aware that the The problem The problem is nesting things in CSS multiple levels deep. Here's an example: /* Links in general on the website */ /* Level 0 */ a { color:#eee; } /* Specific links in lists, navigation, header and footer */ /* Level 1 */ li a, nav a, header a, footer a { color:#555; } /* Specific links, another level deeper */ /* Level 2 */ section li a, section nav a, section header a, section footer a, article li a, article nav a, article header a, article footer a, aside li a, aside nav a, aside header a, aside footer a { color:#000; } /* Level 3 */ /* Yeah, you get the idea */ As you can see, each level we go deeper, the CSS selector will get harder to read/understand. The solution The /* Links in general on the website */ /* Level 0 */ a { color:#eee; } /* Specific links in lists, navigation, header and footer */ /* Level 1 */ :any(li, nav, header, footer) a { color:#555; } /* Specific links, another level deeper */ /* Level 2 */ :any(section, article, aside) :any(li, nav, header, footer) a { color:#000; } /* Only apply to headings, another level deeper */ /* Level 3 */ :any(section, article, aside) :any(li, nav, header, footer) :any(h1, h2, h3) a { color:#aaa; } I know the Thoughts As you can see, you can group several selectors together in the This selector is especially useful when using the HTML5 So, this selector is especially useful when you have some neat HTML5 with nested elements, and don't want to use the What do you think? Feel free to share! Further reading
Tags: any css selector firefox webkit Interested in this topic? You might enjoy another article I've written called |
< Prev | Next > |
---|
Search |
---|
Or try the sitemap |