Skip to content

Instantly share code, notes, and snippets.

@kris-ellery
Last active August 11, 2016 03:33
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kris-ellery/6f737faebd0950c910fd to your computer and use it in GitHub Desktop.
Save kris-ellery/6f737faebd0950c910fd to your computer and use it in GitHub Desktop.
<!-- Hero CTA -->
<button class="c-button c-button--outline t-red c-hero__button js-hero-button qa-hero-button">Hero CTA</button>
// Button base
.c-button {} 

// Button modifier with structural properties.
// In example: `border: 1px solid transparent; padding: 5px 10px;`
.c-button--outline {}

// Theme, which is scoped to button modifier. 
// In example: `border-color: map-get($colors, “red”); color: map-get($colors, “red”);`
.c-button--outline.t-red {}

// Parent component hook. Very specific case/scenario.
// In example: `align-self: flex-end;`
.c-hero__button {}
// JavaScript selector hook
let heroButton = document.querySelector('.js-hero-button')

// QA selector hook
let heroButton = document.querySelector('.qa-hero-button')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment