W3C home > Mailing lists > Public > www-style@w3.org > January 2004

Re: [css3] URI selectors

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Sun, 04 Jan 2004 08:11:01 +0100
To: "Chris Moschini" <cmoschini@myrealbox.com>
Cc: www-style@w3.org
Message-ID: <4015b822.365566356@smtp.bjoern.hoehrmann.de>

* Chris Moschini wrote:
>For this reason, why not offer as part of the CSS3 spec a selector that can differentiate
>between URIs? Something like:
>
>uri( "www.w3c.org" ), url( "www.w3.org" ) { font-size: 150%; }

Just on the syntax, I proposed something like

  foo[base()^="http://www.w3.org"]    { ... }
  foo[base()$=".svg"]                 { ... }
  foo[base()="http://www.w3.org/TR/"] { ... }
  foo[base()*="/ad/"]                 { ... }

To reuse syntax/functionality and to allow authors to use it in
documents using xml:base. If the latter is not desired, it could
be document-uri() instead. If one expects to have many rules
there could be a @context <selector> at-rule like

  @context [base()^="http://www.w3.org"] {
    h1 { ... }
    ...
  }

or

  @context [base()^="http://www.w3.org"];
  h1 { ... }
  ...

which could resolve to

  [base()^="http://www.w3.org"] h1 { ... }
  [base()^="http://www.w3.org"] ...

@context would of course be useful without base(), too.
Received on Sunday, 4 January 2004 02:13:30 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:25 GMT