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

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