Skip to content

Instantly share code, notes, and snippets.

@vovanmix
Last active January 14, 2016 18:26
Show Gist options
  • Save vovanmix/24ab3d86056efc493ce9 to your computer and use it in GitHub Desktop.
Save vovanmix/24ab3d86056efc493ce9 to your computer and use it in GitHub Desktop.
  1. Style existing HTML rather than update HTML. Like, with bootstrap modal and buttons - better to use the default html and add style it with sass, because we can later use js components that will generate standard bootstrap elements and it will be hard to customize their HTML

  2. Create CSS classes that will describe semantics of elements and not their appearance. It will help with redesign later. For example, we have all buttons in green color, instead of appending ".green" class to them, better to append "primary-button", and later if we want to make all buttons purple, we just have to change CSS instead of HTML

  3. Change CSS is always more easy than change HTML. Because HTML later got split between dosens of components, but CSS(sass) is always in one place. Even more, HTML components can become reusable, and all too strict class naming will become a problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment