branchandroot: oak against sky (Default)
Branch ([personal profile] branchandroot) wrote in [community profile] style_system2009-08-21 09:25 pm

Adding a snippet of css in a theme

So let us suppose that I'm making a theme for a layout that already uses the print_stylesheet function (a theme for Modish, in the event). Let us further suppose that I want to add a little bit of css to this theme without copying the whole inherited stylesheet just to change one line. Does anyone know of a good way to do this?
mmmag: A cotton cloud with drop shaped beads dangling below. (Default)

[personal profile] mmmag 2009-08-22 08:24 am (UTC)(link)
If the theme is in use, couldn't you just use the customization wizard (custom css) to do that?
ninetydegrees: Art & Text: heart with aroace colors, "you are loved" (Default)

[personal profile] ninetydegrees 2009-08-22 01:50 pm (UTC)(link)
I'd use print Page::print_custom_head() { }

Edit: Hmm. Wait. I'm not sure if it's printed before or after print_stylesheet.

Edit2: It's printed before print_stylesheets so you may have to use !important. I don't know if that works with all browsers.
Edited 2009-08-22 13:54 (UTC)
afuna: Cat under a blanket. Text: "Cats are just little people with Fur and Fangs" (Default)

[personal profile] afuna 2009-08-22 05:16 pm (UTC)(link)
We're talking a bit in Bug 1611 about possibly splitting off the layout-specific bits in print_stylesheets() to a print_default_stylesheet block. The layout (or theme) could then override it or add new css, without it being too painful...