6 thoughts on “Per Site User Stylesheets

  1. I like the idea of using JavaScript to set the ID, and possibly turning it into a bookmarklet, but I wouldn’t necessarily use the site sig idea. If you set it up where you give the body an ID that you have set up in your user style sheet, you can use the bookmarklet/user stylesheet idea to globally override most of the settings that people wish they could change (i.e. fonts, colors, paragraph spacings,etc.). Where the whole idea breaks down is when CSS rule specificity is set to such a point that you can’t get at specific rules due to the cascade, and this is true of using a site sig on the BODY tag as well (if I’m not mistaken).

  2. If user stylesheets take off, I can imagine “designers” who want to control their site appearance gratuitously using !important to remove your ability to override.

    You can’t save them all…

  3. Yeah but part of the cascading nature of stylesheets is that user stylesheets naturally have a high specificity, just like embedded stylesheets overrule external ones. I don’t remember exactly where they fall, maybe somenoe could enlighten usp

  4. uh-oh! Stop! Please don’t promote bad ideas like that. This hack is about as ugly as it gets. Wantonly altering the ID of elements of a document will break lots of things. Stateful navigation anyone?
    If you have to use a hack like this to enable per-site user-stylesheets, why not append a custom class to the class attribute of the html or body element? If you would use a random number in the classname, this would almost certainly not interfere with the document’s author stylesheets and/or scripts.
    Having said that, I don’t see why it would be necessary to modify the document structure at all. Omniweb 5’s per-site-preferences show that it’s possible.

Comments are closed.