Domain selectors

Quick and dirty.

I grow fond of the utility of something like a domain (more precisely:
hostname) selector:

  [host='example.com'] html { color: red }

The syntax would follow that of attribute selectors (as well as RFC 3986).

The only constraint would be that the domain selector would need to be
followed by another selector (as with “html” in example).

The use cases:

1) More effective—or rather finally manageable—handling of
multi-domain/subdomain sites (as with easier “skinning”).

2) More robust user style sheets (as in reasonably limiting the scope
of possibly overly aggressive selectors).

I’m not aware of any existing work here and, glossing over the idea,
it seems to be of value.

What would talk us out of this?

-- 
Jens Oliver Meiert
http://meiert.com/en/

✎ The Little Book of HTML/CSS Frameworks: http://meiert.com/frameworks

Received on Saturday, 7 March 2015 19:47:00 UTC