• What?
  • Who?
  • Contact Jonathan Jeter
  • Privacy Policy

Jonathan Jeter

Director of Application Development

  • Jonathan Jeter on Google+
  • Jonathan Jeter on Facebook
  • Follow Jonathan Jeter on Twitter
  • Jonathan Jeter on LinkedIn
  • Jonathan Jeter's rss feed
Home Web Development CSS SMACSS Your Sass Up Mina Markham – Front Porch Front-End Developers Conference, Dallas, TX

SMACSS Your Sass Up Mina Markham – Front Porch Front-End Developers Conference, Dallas, TX

October 7, 2014 By Jonathan Jeter Leave a Comment

Presented by Mina Markham

SMACSS is not a framework. It’s an approach to authoring your style sheets. You can use

categorization

– base,
– layout, modules, states and themes

base styles are bare minimum (css reset)
layout styles are the grid system and any defining elements of your site (header/nav/etc)
modules is where you write the bulk of the css. components of pages
states are the active, collapsed, hidden or other states of your modules. You can use a separate naming convention for these
themes don’t always apply, but a theme can be a new skin for modules

base uses standard tags
layout can use a .layout prefix for your styles
modules use the name of the module
state styles can use a .is- prefix
theme can use .theme- prefix

Depth of Applicability – selector from hell
When you deeply nest a selector, you increase the chance that the selector will break if the css changes. Adding a selector with a prefix helps avoid nesting. .nav-subitem a

Use naming conventions, class selectors and don’t nest more than one child deep.

Add some Sass

Uses the &- or &_ to prefix names

nesting – The Inception Rule [don’t go more than 3 levels deep]

.btn{…}
.btn-large{…}

@extend the main module, which means you don’t have to add both classes in the html.

instead of

%btn allows you to use a placeholder selector that won’t actually be included in the css if you are always going to extend the class

Sass allows you to break down css into utility states and import them into the main style sheet (including third-party css from frameworks, font libraries, etc.) Then you import all of the pieces

1. Utilities
2. Libraries
3.

!important – shame.css (anything that is a hack can go into shame.css so that you can come back and fix them later. With Sass, you can import it at the end using _shame.scss.

nina.so/sassyStarter

Theming

@mixin theme($name) {

}

instead of using separate naming for theming….

*Disclaimer

It also outputs all the base styles, instead of just the theme styles.

refactor things – don’t revamp everything

nina.so/smacss-menu

Before: 161 lines of css
After: 97 lines of css

Recap & resources

namespace with ampersands & extends

  • Scalable and Modular Architecture for CSS – smacss.com
  • sass-lang.com
  • sassmeister.com

Presentation slides: nina.so/smacss

Tell someone about this:

  • Email
  • Print
  • Twitter
  • LinkedIn
  • Facebook
  • More
  • Reddit
  • Pocket
  • Tumblr

Like this:

Like Loading...

Related

Filed Under: CSS, Front-End Development, Web Development Tagged With: conference notes, frontporch, frontporchio, Style Sheets

About Jonathan Jeter

Jonathan Jeter has been creating websites since 1997. He is currently Director of Technology Services and Digital Development at TracyLocke, a shopper marketing agency. You can follow him @mywebthoughts, on LinkedIn or connect on Google+.

What do YOU think? Let me know...Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Stuff I Like to Talk About:

  • Business
  • Digital Imaging
  • Internet Marketing
    • Email Marketing
    • SEM / Paid Search
  • Life
  • Other Stuff
    • Health
    • Taekwondo (TKD)
  • Sports
    • Football
  • Technology
    • Augmented Reality
    • Awesome or Scary?
    • Marketing Technology
      • Data / Analytics
      • Omnichannel
    • Mobile
      • Android
    • Virtual Reality
  • User Interface / User Experience Design
  • Web Development
    • Browsers
    • CSS
    • Front-End Development
    • Google+ (Google Plus)
    • HTML5
    • JavaScript
    • jQuery
    • Mobile
    • MVC
    • Responsive Design
    • SEO
    • Social Media
    • UI/UX
    • WordPress

HTML

  • HTML Entities

JavaScript

  • MEAN.js

My Sites

  • Head Turning Media
  • Jonathan Jeter (Brand Yourself)
  • My Humor

Online Experts

  • Bryan Eisenberg
  • Danny Sullivan
  • Duane Forrester
  • Keith Brown
  • Louis Gray
  • Matt Cutts

UI / UX

  • Jared Spool
  • Paul Jeter
FreshBooks
Genesis Framework for WordPress Premise Landing Pages Made Easy

Most Popular

  • Who?
  • Verizon Wireless – My Favorite Mobile Provider
  • Looking for Instagram or Android fonts or logos and…
  • Exploring Standard Ad Unit Sizes: Google AdSense…
  • Contact Jonathan Jeter
  • A Brief History of the Complete Redesign of Google…
  • Jared Spool – The Essential Principles behind…
  • To The Moon And Back: Taking The Leap Towards…
  • Privacy Policy
  • I wanted to use Google Chrome to create this post,…

Copyright © 2025 Jonathan Jeter

%d