当前位置: 动力学知识库 > 问答 > 编程问答 >

trac: modification roadmap thru style.css doesn't work

问题描述:

I'd like to add new group on the trac roadmap progress bar. To do this I've modified trac.ini file with:

# Definition of an 'rejected' group:

rejected = rejected

rejected.order = 2

rejected.css_class = my

rejected.label = rejected

where I've associated to css_class atribute value my.

Next I've created style.css file with one line only:

table.progress td.my { background: blue; }

The file style.css is read however the colour is not applied.

When I change back to the default one i.e.

rejected.css_class = new

the progress bar is updated and displaying yellow colour as expected.

However, it not displaying when I use

rejected.css_class = my

Any ides why?

网友答案:

First, for reference, the authoritative documentation on the subject is in trac.edgewall.org's wiki.

Now, did you try with other color expressions, like the common hex values, i.e. #BAE0BA (green Trac default for closed)? You could even try to set the full range of values for the background key like none repeat scroll 0 0 #BAE0BA.

网友答案:

Remember that CSS styles will override each other depending on the order in which they are encountered. The page may be loading your custom style correctly, but if another stylesheet is loaded after your style.css and that stylesheet includes any styles that conflict with yours, then the later stylesheet will override yours. Double-check that your custom stylesheet is being included and isn't being silently overridden by another stylesheet (I find the Firebug plugin for Firefox to be helpful in tracking down these sorts of issues).

分享给朋友:
您可能感兴趣的文章:
随机阅读: