From 7221c2cd108d59aebb442cdd6e9af66be4b70645 Mon Sep 17 00:00:00 2001 From: Olivier Lacan Date: Fri, 15 Feb 2019 12:02:17 -0500 Subject: [PATCH] Fix odd import issue with individual Sass files Seems like these individual Sass files are compiled individually despite being imported by the main application.css.sass file which means we now have to import the variables.sass file with all the Sass variable declaration in each of them. # Title # Tell me everything! # Co-authors (they will be credited on GitHub as well) # Co-authored-by: Carolina Powers # Co-authored-by: Meg Kline-Tuls # Co-authored-by: Will # Co-authored-by: thatchej --- source/assets/stylesheets/anchors.sass | 2 ++ source/assets/stylesheets/application.css.sass | 12 +----------- source/assets/stylesheets/layout.sass | 2 ++ source/assets/stylesheets/sections.sass | 2 ++ source/assets/stylesheets/table-of-contents.sass | 2 ++ source/assets/stylesheets/variables.sass | 10 ++++++++++ 6 files changed, 19 insertions(+), 11 deletions(-) create mode 100644 source/assets/stylesheets/variables.sass diff --git a/source/assets/stylesheets/anchors.sass b/source/assets/stylesheets/anchors.sass index bde83e2..f6fcc36 100644 --- a/source/assets/stylesheets/anchors.sass +++ b/source/assets/stylesheets/anchors.sass @@ -1,3 +1,5 @@ +@import "variables" + .anchor display: none font-style: normal diff --git a/source/assets/stylesheets/application.css.sass b/source/assets/stylesheets/application.css.sass index 21c00c6..ee02205 100644 --- a/source/assets/stylesheets/application.css.sass +++ b/source/assets/stylesheets/application.css.sass @@ -1,14 +1,4 @@ -$base-font-family: 'Muli', "Helvetica Neue", Helvetica, Arial, sans-serif -$source-code-font-family: "Source Code Pro", monospace - -$color-black: #342828 -$color-white: #FFFFFF -$color-ocre: #E05735 -$color-gold: #faa930 -$color-bark: #3F2B2D -$color-sand: #FEECD3 -$color-light-sand: lighten($color-sand, 10%) - +@import "variables" @import "layout" @import "anchors" @import "sections" diff --git a/source/assets/stylesheets/layout.sass b/source/assets/stylesheets/layout.sass index ddcee3d..c7926a1 100644 --- a/source/assets/stylesheets/layout.sass +++ b/source/assets/stylesheets/layout.sass @@ -1,3 +1,5 @@ +@import "variables" + $break-small: em(480px) $break-medium: em(800px) $break-large: em(1024px) diff --git a/source/assets/stylesheets/sections.sass b/source/assets/stylesheets/sections.sass index eaee539..9d4f1e4 100644 --- a/source/assets/stylesheets/sections.sass +++ b/source/assets/stylesheets/sections.sass @@ -1,3 +1,5 @@ +@import "variables" + div.header padding-top: 5em padding-bottom: 0.1em diff --git a/source/assets/stylesheets/table-of-contents.sass b/source/assets/stylesheets/table-of-contents.sass index a305890..2d7750c 100644 --- a/source/assets/stylesheets/table-of-contents.sass +++ b/source/assets/stylesheets/table-of-contents.sass @@ -1,3 +1,5 @@ +@import "variables" + .toc position: fixed z-index: 9999 diff --git a/source/assets/stylesheets/variables.sass b/source/assets/stylesheets/variables.sass new file mode 100644 index 0000000..b37548c --- /dev/null +++ b/source/assets/stylesheets/variables.sass @@ -0,0 +1,10 @@ +$base-font-family: 'Muli', "Helvetica Neue", Helvetica, Arial, sans-serif +$source-code-font-family: "Source Code Pro", monospace + +$color-black: #342828 +$color-white: #FFFFFF +$color-ocre: #E05735 +$color-gold: #faa930 +$color-bark: #3F2B2D +$color-sand: #FEECD3 +$color-light-sand: lighten($color-sand, 10%)