Modify ↓
#5497 closed defect (worksforme)
Can't customize style of !BlogFlash
Reported by: | Owned by: | osimons | |
---|---|---|---|
Priority: | normal | Component: | FullBlogPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 0.11 |
Description
I'm using the BlogFlash macro to create a NewsFlash like box on the WikiStart page of one of our projects and tried to change its style but to no avail. It seems that (one of) the add_stylesheet
calls is responsible for
<script type="text/javascript"> jQuery.loadStyleSheet("/projects/utsushi/chrome/tracfullblog/css/fullblog.css", "text/css"); </script> <div id="altlinks"> <h3>Download in other formats:</h3> <ul> <li class="last first"> <a rel="nofollow" href="/projects/utsushi/wiki/WikiStart?format=txt">Plain Text</a> </li> </ul> </div>
just before the alternative format downloads and that this overrides whatever I put in the project's site/style.css
file. Note, other customisations in site/style.css
do take effect so that file is found alright.
Using r4222 of the plugin with Trac 0.11.1. Modifying fullblog.css
system-wide is not an option.
Attachments (0)
Change History (2)
comment:1 Changed 15 years ago by
Resolution: | → worksforme |
---|---|
Status: | new → closed |
comment:2 Changed 15 years ago by
Thanks! Using the relevant bit of CSS, I got things to work using
div.wikipage div.blogflash { /* style here */ }
Note: See
TracTickets for help on using
tickets.
That sheet is added by the macro. Macros/processors in Trac render so late in the page-cycle, that they cannot add to
<head>
. That is why Trac adds them at the end of the page.You can still override, as CSS rules are applied according to relative weight - where order is one of the inputs. Some things that may increase the relative weight of your styles are:
div {}
will have less weight thandiv.class1 div.class2 {}
, so make your styles more specific than the one from the plugin!important
keyword on the individual styles to increase their weightRead up on the rules of CSS weighting - I don't remember them all off-hand. However, if you do spot individual styles in the fullblog plugin that are too specific for practical override, I'll listen to feedback and change them if possible.