Weird CSS compilation

Found a bug? Tell us!!
Post Reply
drx
Regular
Posts: 17
Joined: Fri May 26, 2006 3:04 pm
Contact:

Weird CSS compilation

Post by drx »

Hi, i am using the freetag plugin and wrote special css to style its output.

However, as i found out, the plugin is inserting its own css into the stylesheet, and this CSS always comes after the CSS i wrote for my theme. So what i write gets overridden unless i use !important.

I think it is in general questionable if plugins should insert their own CSS like this, it makes it hard to unpredictable how things will look. If it is absolutely neccessary, i suggest that:

# The theme's CSS should be inserted LAST in the css chain, so it can override what plugins generated, without having to use !important

# It should be possible to switch off this CSS compilation in general and only use the theme's CSS. Like this, useless overrides could be avoided.

Bests,
drx

BTW, is there a place to report plugin-bugs?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Weird CSS compilation

Post by garvinhicking »

Hi!

The plugin does not append its own CSS if you declare ".serendipity_freeTag' in your custom CSS somewhere.

Most plugins add their own CSS at the top of the output, the freetag plugin is one of those that don't do it. I'm not sure, why. :)
# It should be possible to switch off this CSS compilation in general and only use the theme's CSS. Like this, useless overrides could be avoided.
Every plugin checks if "his" CSS attribute is used and cancels his output if it is, so you just need to make sure you add that CSS to your theme to disregard other output.
BTW, is there a place to report plugin-bugs?
Yes, exactly here. :)

Thanks,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
drx
Regular
Posts: 17
Joined: Fri May 26, 2006 3:04 pm
Contact:

Post by drx »

The plugin does not append its own CSS if you declare ".serendipity_freeTag' in your custom CSS somewhere.
Ahhhh! Does it only work if i use it exactly like you did here, or do constructions like

Code: Select all

#topWrapper div.header div.serendipity_freeTag {...}


do the trick as well? I am a bit lost on how all this works, is there some detailed documentation on it?

I will report bugs with the freetag plugin in a minute here.

Thanks and greets,
drx
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

It simply matches on the Supstring ".serendipity_freeTag" that must be present in the style.css

HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
drx
Regular
Posts: 17
Joined: Fri May 26, 2006 3:04 pm
Contact:

FreeTag now plays along!

Post by drx »

Great, so the freeTag plugin keeps its CSS to itself now!!

But still i have a problem: how can i load additional stylesheets or images via the CSS url attribute when the stylesheet is mangled through serendipity's stylesheet-combiner?

For example i want to use a background image:

Code: Select all

background: url(img/wxsat.gif) top left no-repeat;
This urls won't work coz the uri of my template directory is somewhere else than what s9y generates for the "virtual" stylesheet.

Thanks for your help,
drx
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: FreeTag now plays along!

Post by garvinhicking »

Hi!

In your style.css file you can use {TEMPLATE_PATH} which will later get substituted for your used template path.

HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
drx
Regular
Posts: 17
Joined: Fri May 26, 2006 3:04 pm
Contact:

Post by drx »

Thanks!
Wouldn't it be easy to parse this from the CSS file and also include files referenced with

Code: Select all

@import url("another.css");
??
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Uhm...I don't understand what you mean?

Only in the style.css it can get replaced, because that gets parsed by s9y's serendipits.css.php file...

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply