Right now Zengine looks for CSS override files in the main (root) directory of a theme. I think that it would be a lot cleaner to keep them in a "css" subdirectory. Can anyone think of a reason why this might be a bad idea?

Comments

dmitrig01’s picture

no :)

quicksketch’s picture

I totally agree. I've done this in all the themes I've made anyway. If you've got more than 1 file, I like to put them all in one place just like images and javascript are kept seperate.

jjeff’s picture

Category: feature » task

For consistency we're going to need to move the Zengine css files into a subdirectory as well. Now it's a task.

morphir’s picture

Category: task » feature

I dunno if a css subdirectory is necessery.
I like the idea of having css subdirs on root with name logic.
Like this:

layouts/layout-1.css, layout-2.css and so on
colors/colors-1.css, colors-2.css
typography/typography-1.css etc...
page.zen.php

This way we have dirs for each type of css, enabling a better and more logic structure. Most appropriate will it be when you have several instances of one particular css-file. Eg. layout-XY.css

morphir’s picture

ooor...

we could just add the css dir as well:

css/layouts/layout-1.css, layout-2.css and so on
css/colors/colors-1.css, colors-2.css
css/typography/typography-1.css etc...
icons/favicon.ico
page.zen.php

quicksketch’s picture

Oh! One caution. I've found that having a file such as css/style.css in your theme directory causes PHPTemplate to think there is a theme called "css". This of course won't be a problem with D6 and .info files, but it's something that Zengine will have to take into consideration. If a theme can be made entirely up of a single css file (kindof the whole point), then we'll need to make sure not to parse style.css under the "css" directory as it's own theme.

morphir’s picture

yes, good point.

However, style.css are depraceted:)

yoroy’s picture

css/layouts/layout-1.css, layout-2.css and so on
css/colors/colors-1.css, colors-2.css
css/typography/typography-1.css etc...
icons/favicon.ico
page.zen.php

Please not like this, too much folders. I'd prefer name logic within 1 css dir in root. "We designers" (me. :-) use a mouse and/or wacom pen, switching between photoshop and bbedit and browsing folders in Finder. Whereas a dev's workflow might be mainly keyboard driven, with less hassle foldernavigation (I presume).
Please spare us (me) those extra clicks. Personally I'm not a fan of too much separate css files, but that's ok, just keep them together in 1 css dir in root please.

morphir’s picture

ok, should this be about your wacom pen and a extra click?

Or should it be about designing a nice filestructure that suits large scale sites as well as your blog?
Seriously, I see your point, but It can not be compared to my point imho.

When I'am introducing 30-40 different predefined css-layouts, as well as 10-20 colors.css-files, you will thank god for that extra click of logic and nicer file structure.
We are talking about the possibility of 60-100 (all together) different css-files here!

Today, style.css is more than good enough for our blogs, but against larger (community) sites, no thank you.

jjeff’s picture

I think I'm sold on the single css directory within each theme dir. We just need to make sure that Drupal doesn't go crazy and think that there's a subtheme called "css".

yoroy’s picture

Could one still add extra subfolders as desired or would those not be seen by zengine?

XHTML Teacher’s picture

I would prefer the CSS files to be in their own directory within a theme, with subdirectories as needed. It is easier to organize, especially on big projects, as Morphir pointed out.

morphir’s picture

Status: Active » Closed (fixed)

We can still place our css-files in a own separate directory like I suggested.
So we ship the theme with css in root at /css dir.