CSS Organization

How I am going to attempt to organize my CSS in the future. Based on https://css-tricks.com/poll-results-how-do-you-order-your-css-properties/ and https://github.com/necolas/idiomatic-css#format.

.selector {
  // extensions
  @extend %generic-selector;

  // position
  position: absolute;
  z-index: 10;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;

  // size
  display: inline-block;
  overflow: hidden;
  box-sizing: border-box;
  width: 100px;
  height: 100px;
  padding: 10px;
  margin: 10px;
  border: 10px solid #333;

  // styles
  outline: 10px dashed red;
  background: black;

  // content
  color: white;
  font-family: sans-serif;
  font-size: 16px;
  line-height: 1.4;
  text-align: right;

  // pseduo-elements
  &:before, &:after {
    // same pattern of selectors
  }

  // child elements
  // ...
}

Here is a Sublime Text snippet to insert the sections:

<snippet>
  <content><![CDATA[
// extensions
${1}
// position
${2}
// size
${3}
// styles
${4}
// content
${5}
// pseduo-elements
${6}
// child elements
${7}
]]></content>
  <!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
  <tabTrigger>format</tabTrigger>
  <!-- Optional: Set a scope to limit where the snippet will trigger -->
  <scope>source.sass</scope>
</snippet>