W3C home > Mailing lists > Public > www-style@w3.org > March 2015

Domain selectors

From: Jens Oliver Meiert <jens@meiert.com>
Date: Sat, 7 Mar 2015 20:46:11 +0100
Message-ID: <CAJ0g8QQLoRgot=TRfi2+vkAV3BcCAkFpgOFCFz7oKFUU6nRKMQ@mail.gmail.com>
To: W3C WWW Style <www-style@w3.org>
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

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:30 UTC