Please add a custom css file like in Acquia Marina. It is very useful.

CommentFileSizeAuthor
clean_custom.patch1.51 KBrstamm

Comments

psynaptic’s picture

Title: Add custom css file » Add a default custom CSS file

There is a custom CSS file! It used to be called custom.css until the latest version where it has been renamed style.css. You don't need to do anything to enable this feature. Just add your rules to style.css and it will work.

I'm going to write something in the README.txt so people are aware of this. How does this sound:

Clean theme's CSS rules have been split into multiple files to facilitate hot-swapping of groups of rules. Eventually we will see extra CSS files that you can swap for the default ones. Imagine having a color.css for creating a light on dark theme more easily with more core/contrib CSS overrides. If you've ever created a light on dark theme you will know that some modules "hardcode" background colors so this would be a quick and easy way around that problem. Imagine having various layout.css files so you could, for example, easily swap the fixed layout for a liquid one.

One problem with this approach is that it becomes harder to develop and maintain a theme with multiple CSS files. This is where our custom CSS file comes into play. There is an empty style.css file where you should put all your custom CSS rules. This means you can keep all the core theme CSS files untouched making it easy to update Clean theme when a new version is released.

Awaiting a response before I commit anything.

rstamm’s picture

It sounds good. But if someone update the Clean theme he will maybe overwrite the style.css.

What about this:

Change stylesheets[all][] = css/style.css to stylesheets[all][] = css/custom.css and delete css/style.css.

And add information in the README.txt that the user has to create the css/custom.css file if he wants to customize the CSS. The css/custom.css file will not be overwritten with next release.

psynaptic’s picture

The thing is though, people are not going to be able to copy over the whole clean directory with a new version. They will have modified template.php, added files like node-type.tpl.php etc.. If they created the site they should by now know they have modified styles.css and if not then they should have a backup anyway!

I'm more open to the idea of changing style.css back to custom.css. This would make it more obvious for newcomers to understand where to put their custom CSS rules.

I don't want to force people to create this file as I don't want to have to do this for each site I build. I prefer to be able to just install and start without anything in my way. Others probably feel the same way. The less hurdles the better.

How is the wording of the text I pasted? Can you fully understand it?

rstamm’s picture

The less hurdles the better.

Allways better.

Text is ok, maybe it is good to add an example.

psynaptic’s picture

Status: Needs review » Fixed

Ok, I have changed a few things today:

- I have renamed the style.css back to custom.css as requested.
- I have added a folder called extra/ within which I have added a light on dark color theme.
- I have added instructions to the README.txt on how this theme was intended to be used.

rstamm’s picture

thanks

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.