Free Website Tips

I read a lot of website advice every day. The best of that advice I wish everyone knew. Brainstorm! Let's put the greatest advice in quick tips. Usually I see a really good tip every few weeks. Remember to act on the tips - they are short so it should be easy.

Recent Twitter Posts

    Clients Include

    United Nations

    Center for Interpersonal Effectiveness


    Coram Deo Consulting Group


    Benchmarx

    DrupalCon Cliff's Notes: Using Sass & Compass in Drupal Theming

    Session: Using Sass & Compass in Drupal Theming
    Presenters: Nathan Smith & Matt Farina

    Basic Premise

    CSS is the least architected, worst thought-out part of a webpage.  PHP exists (largely) to <strong>preprocess</strong> HTML.  CSS had no-such equivalent.  Enter Sass & Compass, etc.

    What are these acronyms of which you speak?

    LESS, Sass & Compass, Stylus & Nib - all are various CSS pre-processing languages

    (Hugely helpful) Oversimplification

    Compass is to Sass as jQuery is to Javascript

    Sass is the underlying framework - the preprocessor.  Compass provides plugins and easy ways to get the most out of Sass in the simplest ways possible.

    Sass Intro

    Different formatting: Sass vs. SCSS

    • SCSS - more similar to SCSS
    • Sass - more similar to Ruby (preferred by both presenters)

    Benefits of Compass:

    • Compass makes vendor prefixes easy - it expands correct syntax out into browser-relevant versions
    • Compass brings sanity to gradients - it expands out to all browser prefixes as well as to SVG!

    GUIs to compile Sass & Compass

    They prefer command line (ie compass watch), but these exist for those who don't.

    Part 2: Whither a module?

    Warning: This is the section that made me stop listening. They reviewed three modules:

    It was at this point I realized that CSS preprocessors are not ready for prime-time in Drupal-land.  I realize the first slide in this section spoke specifically about "Bad Reasons" for using a Drupal module, and my reasoning probably includes both:

    • Getting Ruby installed on production servers is daunting
    • Synchronizing a second language/platform/system across development, staging and production is terrifying

    Go ahead, you hackers, laugh.  Done?  Well now, in Drupal-land there are so very many options available.  In web-land there are even more.  At some point you have to pick and choose which you'll do and a former manager I had would always say "go for the low-hanging fruit".  I'm ridiculously glad there are people like Matt Farina who are willing to live on the cutting edge, but for average clients and normal sites I'd rather invest hours into multiple improvements with existing well-tested modules, instead of hacking my way through cutting edge modules with under 200 sites using them.

    Soooo...skim through the rest of the session slides, and call it a day.  Unless you've already resolved to use Sass & Compass.  In that case dive in and listen to the session yourself and know that - when I do start using the then well-tested Sass modules - you'll have my gratitude for your early adoption.