W3C home > Mailing lists > Public > www-style@w3.org > May 2013

Re: [css-url-selector] Proposal for a new selector

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 2 May 2013 10:46:01 -0700
Message-ID: <CAAWBYDDW851V=-+HezzUX9q79iDvepbpzwa_H0JKzbv=94qq9g@mail.gmail.com>
To: Omar Vigon <omarvigon@gmail.com>
Cc: www-style list <www-style@w3.org>
On Thu, May 2, 2013 at 8:47 AM, Omar Vigon <omarvigon@gmail.com> wrote:
> This is my first post to this mailing list so hopefully I am doing
> things correctly here.
>
> The css-url-selector would work as follows:
> -Checking the URL of the document in the same way than the
>  Attribute Selector
>  (http://www.w3.org/TR/css3-selectors/#attribute-selectors)
>
> -According to the Location Interface
>  (http://www.w3.org/TR/Window/#location)

What kind of things are you planning to do with these rules?  For
example, what kind of styles would you apply to a document based on
the port, or the host?

Note that we already have some forms of url matching specified in CSS.
 The :local-link() pseudo-class
<http://dev.w3.org/csswg/selectors/#local-pseudo> lets you target
linking elements that match the document's url in certain ways.  The
next level of the Conditional Rules spec
<http://dev.w3.org/csswg/css-conditional/> will have the @document
rule (based on Firefox's @-moz-document rule
<https://developer.mozilla.org/en-US/docs/CSS/@document>) which lets
you apply style rules only if the document's url matches a certain
pattern.  This seems pretty close to what you're asking for.

~TJ
Received on Thursday, 2 May 2013 17:46:49 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:29 UTC