diff --git a/_config.yml b/_config.yml index f313f10e..b1905a96 100644 --- a/_config.yml +++ b/_config.yml @@ -1,5 +1,5 @@ -name: Code Guide by @mdo -description: Standards for developing flexible, durable, and sustainable HTML and CSS. +name: Code Guide by Food52 +description: Standards for developing flexible, durable, and sustainable HTML, CSS and SCSS. url: http://codeguide.co markdown: rdiscount diff --git a/_includes/footer.html b/_includes/footer.html index 8f1858ca..48c4e444 100644 --- a/_includes/footer.html +++ b/_includes/footer.html @@ -1,22 +1,6 @@ diff --git a/_includes/header.html b/_includes/header.html index 20bfdc24..a136b77a 100644 --- a/_includes/header.html +++ b/_includes/header.html @@ -5,14 +5,13 @@

{{ site.name }}

{{ site.description }}

- diff --git a/_includes/js.html b/_includes/js.html deleted file mode 100644 index 531643e3..00000000 --- a/_includes/js.html +++ /dev/null @@ -1,15 +0,0 @@ - - - diff --git a/_includes/scss/nesting.scss b/_includes/scss/nesting.scss new file mode 100644 index 00000000..51de205e --- /dev/null +++ b/_includes/scss/nesting.scss @@ -0,0 +1,26 @@ +// Bad example +.component { + color: #333; + + .component-piece { + background: #fff; + + .component-subpiece { + border: 5px solid #555; + } + } +} + + +// Good example +.component { + color: #333; + + .component-piece { + background: #fff; + } + + .component-subpiece { + border: 5px solid #555; + } +} diff --git a/_layouts/default.html b/_layouts/default.html index c6466296..a2ee1b16 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -12,15 +12,7 @@ - - + @@ -30,7 +22,5 @@ {% include footer.html %} - {% include js.html %} - diff --git a/index.html b/index.html index efa6b0b9..55e14d1d 100644 --- a/index.html +++ b/index.html @@ -40,13 +40,19 @@

CSS

  • Organization
  • +
    +

    SCSS

    + +

    Golden rule

    -

    Enforce these, or your own, agreed upon guidelines at all times. Small or large, call out what's incorrect. For additions or contributions to this Code Guide, please open an issue on GitHub.

    +

    Enforce these, or your own, agreed upon guidelines at all times. Small or large, call out what's incorrect.

    @@ -394,6 +400,23 @@

    Organization

    +
    +

    SCSS

    +
    + +
    +
    +

    Nesting

    + +
    +
    + {% highlight scss %}{% include scss/nesting.scss %}{% endhighlight %} +
    +
    + +

    Editor preferences

    @@ -407,3 +430,5 @@

    Editor preferences

    Consider documenting and applying these preferences to your project's .editorconfig file. For an example, see the one in Bootstrap. Learn more about EditorConfig.

    + +