Forums | Mahara Themes
General discussion
/
Default style.css included regardless of current theme
16 May 2009, 11:54
While working on a new theme, I noticed that the default style.css is included regardless of the current theme you are using. Is this a bug (seems like a bug) or is it intentional? Either way, it's definitely not something I want to happen. Anybody know how to remove it?
Thanks
17 May 2009, 13:23
Are you sure you want to remove it? The way that themes using CSS work is that the default css covers everything with soem sort of style. You can override any style of any element simply by adding it to your css sheet. Just ignore any elements you don't want to change, and they will still be covered.
Are you familiar with using firebug (in your FireFox browser) or equivalent? It lets you inspect the CSS that is running any webpage, and it will show you how various css files are overriding other css files. Very useful when making yoru own design, as you can "steal" stuff from other css files.
Good luck!
Jamie
17 May 2009, 14:27
Unless you specifically set each and every property that the default css file uses, the default will usually screw up your styles. Depending on your site design, you could end up with a needlessly bloated css file.
When using a different theme, the default css file should not load at all, as a properly created theme should have all the styles and properties necessary for your site design.
I removed the default css file with some template coding, but I would prefer to remove it at the source.
17 May 2009, 17:30
Hi - from Mahara 1.2, there will be a new, smaller default theme that will be easier to style from.
The theme system inherits the way it does because it's a bit simplistic at the moment. There are some rules in the default stylesheet that you actually probably need - mostly relating to structure. Though, there's a bunch of !important rules as well which make things annoying when you're trying to write an overriding stylesheet. That's one thing the new default theme will clean up a lot.