Bug 125388 - Support "@-moz-document" for custom CSS
Summary: Support "@-moz-document" for custom CSS
Status: CONFIRMED
Alias: None
Product: konqueror
Classification: Applications
Component: khtml (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR wishlist
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-11 23:34 UTC by Mike Swanson
Modified: 2012-01-29 00:29 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Swanson 2006-04-11 23:34:43 UTC
Version:            (using KDE KDE 3.5.2)
Installed from:    Gentoo Packages

There is a non-standard CSS extension by Mozilla called @-moz-document which allows custom stylesheets to make domain-specific modifications. This tends to be useful since several sites use generic names so that a custom stylesheet for one site is likely to break other web sites.

Usage is like the following:
@-moz-document domain(kde.com)
{
body
  {
    background: #ddd !important;
    color: #123 !important;
  }
}

In Mozilla (and derivations; Firefox, K-Meleon, etc) this will make the changes apply only to kde.org, thus keeping the rest of the Web sane for either their defaults or other specific changes.
Comment 1 Thiago Macieira 2006-04-14 01:47:42 UTC
Are you talking about the user custom stylesheet, not one retrieved from the webserver?
Comment 2 Mike Swanson 2006-04-14 05:02:50 UTC
Yes, exactly
Comment 3 Thiago Macieira 2006-04-14 19:44:18 UTC
You do realise that, if we add this, it won't be called "-moz", but "-khtml", right?
Comment 4 Allan Sandfeld 2006-04-14 22:46:44 UTC
Actually I've already considered this idea, but I thought it would fit better in together with domain specific JS (grease konqui), than in the user stylesheet.
Comment 5 Mike Swanson 2006-04-14 23:15:35 UTC
First off, yeah it'd be fine changing to -khtml. It's not that big of a problem... just change existing userContent.css' floating around to -khtml instead of -moz. Trivial change, really

And secondly, I don't really care for a Javascript implementation myself. I never learned Javascript and I like CSS just fine ;P
Comment 6 Ismail Donmez 2006-05-07 20:05:57 UTC
Would love to have this.
Comment 7 Nick Presta 2007-02-04 22:26:05 UTC
I would really love to see support for this. 
I'm curious as to what the status is on this request? Is this request to be denied and all domain-specific styles should be added through KonqJS (Which makes this more complicated than it has to be) or is this going to be considered in the near future?
Thanks for any updates.
Comment 8 Anton Kuzmin 2007-06-03 19:40:45 UTC
I'd love to have it in konqueror. With excellent css support in konqueror, this feature is a need!

It also enables me to cut unwanted advertisement and other unwanted blocks of html code.
Comment 9 Anton Kuzmin 2007-06-03 21:59:54 UTC
http://developer.mozilla.org/en/docs/CSS:@-moz-document
@-moz-document
  url
  url-prefix
  domain
Comment 10 Anthony Parsons 2012-01-29 00:29:38 UTC
Anyone still following this bug may be interested to know the syntax finally made it into a W3C draft at the end of last year(!), so there's still hope it might be implemented one day:

http://www.w3.org/TR/css3-conditional/#at-document