So I've been modifying the MU Admin Bar to look better with any theme, because the default look did not go with my main page theme and I figured even if I changed it to, it would eventually be on a theme where it wouldn't look good.
So I extended the header image by 28px high, and gave the MU Admin Bar transparent background and removed the border. It looks good execpt the link color will need to be dark on a light theme and dark on a light theme.
So to my question, how would I go about specifying the link colors in the themes CSS file?
Ok maybe I should ask if this is even possible, because in th emean time I ha tried a few things that I wasn't sure of like copying the CSS to the themes CSS file and taking out the color option from the CSS embedded in the plugin and then only specifying the color in the themes CSS, unless there is a step i'm missing that i'm just not thinking of thats not working.
Any suggestions?
Alright so I think I came up with the answer while driving today...lol
I doubt the plugin looks at the themes CSS, so I need to call the themes CSS, but this brings up a question, is their a way to figure out the CSS path for the current theme short of getting the blog URL, doing a db query to find what theme it uses and know the CSS path from that, because even though I could do t that way, the issue is that I would prefer a method that is less resource intensive.
Ok well I got it working to an extent, but it pulls the CSS from my homepage theme, so now I am to the part where I need to figure out how to pull it from the current theme of the page that is being viewed.
I really hope you get this working because I have been wondering about this myself to replace the CustomCSS that I have to put in each time I change themes.
Trent
MrBrian
Member
Posted 16 years ago #
A transparent background and removed the border? Sounds like your making it tough on yourself :P. IF it were me, i would make it so you didn't need to adjust text light for dark and dark for light, but i think an easier way to do this than pulling the CSS would be to pass an argument to the hooked function. I didn't like it in the footer though so all my themes have do_action( 'admin_bar'); in the header and i changed the hook.
Also, doesnt this function echo the CSS url?
bloginfo('stylesheet_url');
Well by making the background transparent and making small modifications to each theme, you can intergrate the bar into the theme and end up looking alot better than as currently.
As far as bloginfo('stylesheet_url'); that works perfectly...I'll be releasing the modifications needed here when I get a chance for anyone else who is interested.
EDIT: Well its not quite ready yet, it seems to be getting confused with the other CSS for the main content links...
It seems to be good now, I repositioned the link to the themes CSS within the plugin file...not 100% sure how that made any diffrence but it seems to be working.
I'll post the modifications in the hacks and plugins forum soon.