0

In building a new theme (for a bespoke build, rather than distribution) is it essential to start with a base theme? If I look at the Zen theme, for example, I would scrap most of the HTML and CSS in order to start with a blank-er canvass than that theme provides. Are there still many benefits to using a theme like Zen in that case?

Update In an attempt to clarify, this is for a professional project, and in terms of HTML/CSS we'd usually start from as little as possible; normalize.css, modernizr and not much more. Most themes seem too 'opinionated', there's too much we'd have to re-style or remove to the point where it would slow development down.

  • 2
    If you "scrap most of the HTML and CSS in order to start with a blank-er canvass" then no, there's very little point in using a base theme. It'd be quicker to pick what you need out of Zen and put it into your own theme than "undo" Zen. Just my opinion though, there isn't really a proper answer to this question as it depends on what you need to do, your level of experience with various disciplines, etc. – Clive Feb 17 '14 at 15:17
  • I am going to counter @Clive and argue that one big benefit of a base theme, especially the mature ones, is the PHP behind the HTML/CSS. Base themes will also have styles for just about everything in Drupal, so if you add something to a site, you more than likely don't have to worry about styling it (at least initially). – mpdonadio Feb 18 '14 at 16:43
  • @MPD I think that's the problem here though - the OP doesn't want those styles, he wants to strip them out and use his own. At which point, it might be quicker to start from scratch then undo what's already there. – Clive Feb 18 '14 at 17:09
  • @Clive I'm not talking about overriding styles, I'm thinking of all of the lesser used classes that often get overlooked. Take forms for example. If you don't have forms on your initial site, you may not think about needing to style them. If you enable Webforms, your pages will likely be a disaster. With a base theme (especially one that includes Formalize), these pages will be decent. – mpdonadio Feb 18 '14 at 18:04
1

If you're not doing a traditional 3 column with header and footer site layout, then no - you probably won't get much out of something like Zen.

That said, you can still leverage the awesome Zen Grids gem with SASS and get the benefits Zen's grid system without any of the cruft from the base theme.

Anyone who has themed enough Drupal sites understands that you're going to be dealing with machine-generated HTML at some point (either from Views, or some other contrib module). You could spend a ton of time overriding all the theme functions to get the exact HTML you need so you can apply the col-xx classes your grid system of choice needs, or you can use the classes that already exist on the pre-existing markup and make them compatible with your grid with Zen Grid's mixins.

I like to say that Zen Grids acknowledges the reality of Drupal theming and comes up with a system that works with Drupal as opposed to against it.

0

The major benefit of using a base theme is that things like jquery and responsive style sheets are included, i.e. you don't have to reinvent the wheel. It is far easier to override and or change the base theme than to create everything from scratch, which depending on your knowledge of Drupal might mean that if you miss something, the base theme stylesheets will have you covered. All of this means faster shipping.

  • Must admit, I disagree. OP specifically said "I would scrap most of the HTML and CSS " so the inclusion of templates/style sheets is actually a negative thing. I guess it's down to the person, but I can bash out a theme from scratch much quicker and, importantly to me, more satisfyingly, than undoing someone else's theme to try and make it fit my standards. Not that Zen/Omega don't have their appeal, but for the situation the OP describes, where he wants to control the CSS and markup, going from scratch is the quicker option – Clive Feb 17 '14 at 16:27
  • Thanks both. Clive describes my/our position very well - I have not found any themes that come close to being helpful in terms of the HTML/CSS (for the project it's for), and starting from scratch doesn't seem particularly daunting, so I was really trying to find out if I was overlooking something significant. – toby1kenobi Feb 17 '14 at 20:16
  • Have you come across Mothership @toby1kenobi? That one strips things the HTML pretty bare, might be worth a look – Clive Feb 18 '14 at 17:07
  • I have looked at Mothership, although I confess not very closely - I will have another look! – toby1kenobi Feb 18 '14 at 20:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.