Opened 11 years ago

Closed 11 years ago

#5229 closed enhancement (wontfix)

Need possiblity to local overwrite css for fullblog

Reported by: trac@… Owned by: osimons
Priority: normal Component: FullBlogPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11



I'd installed this nice plugin and converted old entries usefull. But what I don't like: I'm not able to overwrite values from within the delivered template 'cause it is called inside the body section and loaded via java script. (jQuery.loadStyleSheet("/chrome/tracfullblog/css/fullblog.css", "text/css");)

but i would - for instance - change the width of div.blogflash without changing the global template (others may don't like it) and this isn't possible. For shared instances of this plugin I think this way applying the stylsheet in body AFTER applying the local modifications of styles isn't a good way. For a single installation it may be ok edit the global template. but not for shared installations.

so may it possible adding the global template BEFORE local stylesheets like it is done for /chrome/common/css/trac.css ?

Attachments (0)

Change History (3)

comment:1 Changed 11 years ago by osimons

No, not really. The problem you describe does not happen inside the regular /blog handler - it happens when you on a wiki page include blog posts using the [[BlogList]] macro. The wiki content renders much to late to be able to add things to the head of the page - that is why it is appended to <body> by Trac itself (I just call add_stylesheet()). As Genshi is a streaming template system, I don't have access to <head> when my macro gets called inside main content.

The problem is the same as for any other macro or processor that add styles inside the regular body content - try for instance to add a chunk of syntax highlighted text on your wiki page, and you'll see that pygments/trac.css (or whatever your theme) gets added in the body as well.

However, styles and overriding of styles is not just based on order - read up on the rules of CSS. Basically each rule is given a score where of course order matters, but also how specific the rule is, and if weight is added to the rule using !important or other means.

I don't have a good way of working around this if you can't do it by styles only.

comment:2 Changed 11 years ago by trac@…

You won :D - so you may close this.

comment:3 Changed 11 years ago by osimons

Resolution: wontfix
Status: newclosed

Sure - a wontfix it is, but where perhaps a cantfix resolution would be more appropriate...

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain osimons.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.