W3C home > Mailing lists > Public > www-style@w3.org > August 2012

Re: [selectors4] Requested selectors

From: Alan Gresley <alan@css-class.com>
Date: Fri, 31 Aug 2012 10:23:21 +1000
Message-ID: <504003F9.5010007@css-class.com>
To: "Belov, Charles" <Charles.Belov@sfmta.com>
CC: "www-style@w3.org" <www-style@w3.org>
On 31/08/2012 10:02 AM, Belov, Charles wrote:
> I respectfully suggest the following selectors (and apologize if they've already been suggested and rejected):
>
> E:foreign-link(0) 	an E element being the source anchor of a hyperlink of which the target is not within the current domain 	The foreign link pseudo-class 	4
>
> Question as to distinguishing between same (a) domain, different subdomain and (b) different domain.
>

Can this not be done with attribute selectors?

a[href*="domain"] /* style */

a[href*="sub-domain.domain"] /* style */


> ---
>
> Domain and protocol as selector, e.g.
>
> http://sfmta.com html {
> }
>
> https://sfmta.com html {
> }
>
> Or just
>
> sfmta.com html {
> }
>
> sfmuni.com html {
> }
>
> Although this would probably be most useful in personal style sheets.
>
>
> Hope this helps,
> Charles Belov
> SFMTA Webmaster

This reminds me of a namespace. I have only tested these with XHTML.

For a personal style sheet, I know you can used Gecko ones. Like so.

@-moz-document domain("domain.com") {
   /* style */
}


1. http://dev.w3.org/csswg/css3-namespace/


Alan


-- 
Alan Gresley
http://css-3d.org/
http://css-class.com/
Received on Friday, 31 August 2012 00:23:49 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:59 GMT