I really like the Zen idea. Good framework, change only the CSS. The sub-themes are just basic overrides in a css file.

I'm working on a site and have an override of about 2/3 of the basic Zen css files. This is going to be rather bloated to download all of the css in duplicate. I finally combined everything into the appropriate style, layout, etc.css files. But this looses the sub-theme and CVS (if I ever figure that out) capabilities.

Is there a better way to keep the benefits of the sub-theme without the added overhead?

Thanks

Comments

johnalbin’s picture

Title: Sub-theme guidelines » Create starter theme; migrate current style to a sub-theme
Version: 5.x-0.6 » 5.x-1.x-dev
Component: Documentation » Code
Category: support » feature
Priority: Minor » Normal

Yes, there's a better way.

Originally the Zen theme had very minimal CSS, but when trying to get it into Drupal 5.x core, people thought it was too basic to include in core; so they added more style.

Unfortunately, that means that Zen is no longer the ultimate starting theme it purports to be. See the discussion at http://groups.drupal.org/node/6353

I think we should strip down the style to a bare minimum and put the existing style in a sub-theme: zen-classic.

brenda003’s picture

I totally agree - I use a modified, stripped down version of Zen as my base theme as it is.

steinmb’s picture

Trackin. I think it is a good idea.

zirafa’s picture

Hi, I wrote/ported most of the CSS for the original zen. I myself am tired of the styles, and would prefer something more minimal.

However the strength in zen is mostly on documentation and having a reference point for beginning - I see it more of a learning tool than anything else.

With this in mind, my personal ideal for a starting theme is:

1) have empty CSS classes defined, so you can just start tweaking from scratch. I want to minimize time using firebug off the bat. It's easy to just delete or ignore empty CSS classes you aren't using at the end.
2) use neutral colors when possible by default
3) a kickass README.txt with PHP snippets to quickly add to template.php. Before the strategy was just to include example overrides and such, but this makes it kinda meaty to start with. I think we can achieve a nice compromise by leaving the actual working code fairly empty but having lots of useful snippets bundled with the theme.

Personally I say scrap the current style and don't have any subthemes.

I was planning on starting another theme project with these principles in mind and based on Zen + useful fixes people have submitted.

Farsheed

johnalbin’s picture

I really like the idea of a having empty CSS rules in the base theme. But I also think that an example sub-theme with the rules flushed out would be useful to look at; even if no one uses that sub-theme for anything else.

I agree that the template.php is a bit too beefy to start with. I'll try to brainstorm on that as well. Perhaps split it up into separate files and include() statements?

Steven_NC’s picture

The open styles make sense. One of the reasons I use Zen is because it has all of the IDs and classes laid out clearly. Then its a matter of styling it to your needs. This makes the theme easy for people with html/css backgrounds to get started with Drupal without having to become a programmer. I think this is extremely important if Drupal is to gain momentum.

I have no problem with separate Zen-based themes rather than actual sub-themes. I was just trying to find a more effective way to keep a highly customized version "zenish".

matt@antinomia’s picture

Status: Active » Needs review
StatusFileSize
new38.02 KB

Attached is a patch which moves the font-normalization from zen.css into fonts.css, and then moves the rest of zen.css into a zen-classic subtheme. It also creates a zen-starter subtheme with empty selectors to hint at what needs to be themed, as Farsheed suggested. I followed the 'zen subtheme' format of attaching the stylesheets using template.php, is that necessary in these cases? "No code was harmed in the creation of this patch. (just moved around a bit)"

johnalbin’s picture

Status: Needs review » Needs work

Hi Matt,

Thanks for the patch, but several hunks FAILED to apply. Can you re-roll so I can get a better look at what this does?

- John

matt@antinomia’s picture

StatusFileSize
new24.28 KB

Hey John, try this one instead...

matt@antinomia’s picture

StatusFileSize
new36.42 KB

Third time's the charm?

Duncan Pierce’s picture

Subscribing, and +1 to the truly minimal main theme with prettier sub-theme idea.

matt@antinomia’s picture

StatusFileSize
new56.64 KB

Rerolled with icons.css and images folder moved into subtheme.

johnalbin’s picture

Status: Needs work » Active

The old style is now a sub-theme in 5.x-1.x-dev.

So, the base Zen theme is extremely bare bones.

In fact, it needs a better page.tpl.php (source ordered) and a layout.css that doesn't break in IE with wide content. I'm going to leave this issue open until those two issues are addressed. http://drupal.org/node/121991 and http://drupal.org/node/110897 respectively.

johnalbin’s picture

Status: Active » Fixed

The two issues I mentioned in my last posting are now fixed. yeah!

Farsheed, #1 (empty styles with comments), #2 (neutral colors) and #3 (README file) of your request have also been added to Zen!

So the main Zen theme is still basic but it is much more useful than its previous skeletal state.

I also like your idea of having snippets available for people to easily add to Zen. But putting them in the README file limits the number of people who could contribute. So, instead, I've created a page in the handbook where we can put tips, techniques, snippets, etc that are specific to the Zen theme: http://drupal.org/node/193318

Anonymous’s picture

Status: Fixed » Closed (fixed)

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