Opened 7 years ago

Closed 7 years ago

# Can't customize style of !BlogFlash

Reported by: Owned by: Olaf Meeuwissen osimons normal FullBlogPlugin normal 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">
</script>
<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.

### comment:1 Changed 7 years ago by osimons

• Resolution set to worksforme
• Status changed from new to closed

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:

• using more specific identification: div {} will have less weight than div.class1 div.class2 {}, so make your styles more specific than the one from the plugin
• use the !important keyword on the individual styles to increase their weight

Read 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.

### comment:2 Changed 7 years ago by Olaf Meeuwissen <olaf.meeuwissen@…>

Thanks! Using the relevant bit of CSS, I got things to work using

div.wikipage div.blogflash { /* style here */ }