Simon Willison’s Weblog


Site specific stylesheets in Mozilla

19th August 2004

New in Mozilla 1.8 Alpha 3: bug 238099—implement at-rule for matching on site/document URL. Here’s the example:

@-moz-document url-prefix( {
  #q { background: white ! important; color: black ! important; }

Drop that in your userContent.css file for black-on-white search fields, but only for pages with URLs starting in Two other selection functions are available: domain( for all page (and sub-domains) of the domain and url( for just the page matching that exact URL.

The sooner this makes it in to Firefox the better.

This is Site specific stylesheets in Mozilla by Simon Willison, posted on 19th August 2004.

Next: A snarky note from the administrator

Previous: Participatory journalism

Previously hosted at