Thoughts Dump: CSS Selectors
Jens Meiert, July 14, 2008 / October 2, 2008.
This entry is filed under Web Development.
Rapid fire thoughts on CSS selectors:
-
WebKit added support for CSS variables (already cheating as this is not about selectors). What are CSS variables? Something Daniel and Dave specified this year. How does it work? Specify variables within an
@variablesat-rule, then call them in property values viavar(). What should we do? Wait and see, and wonder if in some cases, decent selector grouping and using declarations just once doesn’t already do the trick. -
Shaun Inman discussed “qualified selectors”. What are qualified selectors? Something like
E < F(whereEis subject of the selector), kind of a parent selector, truly proposed a several times, as Anonymous did in 2006. What happens next? I’m not sure, actually, but as this as well as proposals like the adjacent combinatorE - Fhappen to mean implementation challenges, we might hope for things like:hasor:matchesto be implemented anyway. -
Jens Meiert did not ship his selector variables draft yet. That’s true. I will take care of that though.
Update (July 16, 2008)
-
Andrew Fedoniouk asks for clarification concerning scoped styles. What are scoped styles? Something kind of suggested years ago, and, quod erat demonstrandum, something not completely defined yet. However, the idea has some charm, and I couldn’t but contribute to the discussion.
Read More
Enjoy the most popular posts, probably including:
Comments
-
On July 22, 2008, 18:54 CEST, Jethro Larson said:
I seriously look forward to variables. Especially where I want to reuse a color for different properties. It also allows you to pull your color standards out of the CSS jumble so you can quickly look at the stylesheet and see what colors you’re using. If you want to do a series of color changes or do bulk template design that gets easier too. It’s not a big thing, but CSS is messy and any way we can clean it up is welcome.
-
On July 22, 2008, 19:06 CEST, Jethro Larson said:
On Scoped Styles: I can see their value. Particularly where you want wigit-like behavior. Being able to say, I want these styles to only affect this element and it’s descendants.
Partner this with a style-reset property/ability and you can have iframe-like control over components of a page. I know that it might sound bad to break the cascade like that, but there are cases where it would be useful.
-
On August 18, 2008, 23:01 CEST, Marius said:
Then do your draft
-
On August 21, 2008, 13:33 CEST, Santhos Webdesign said:
You might consider using a .htaccess to make your css files behave like php. Brings a lot more oppertunities!
-
On September 25, 2008, 12:21 CEST, Jens Meiert said:
Latest news: WebKit just disabled “their” CSS variables …