diff --git a/_sass/_base.scss b/_sass/_base.scss index 436347c..99b540a 100644 --- a/_sass/_base.scss +++ b/_sass/_base.scss @@ -1,3 +1,5 @@ +@use "sass:color"; + /** * Reset some basic elements */ @@ -34,7 +36,7 @@ h1, h2, h3, h4, h5, h6, p, blockquote, pre, ul, ol, dl, figure, %vertical-rhythm { - margin-bottom: $spacing-unit / 2; + margin-bottom: calc($spacing-unit / 2); } @@ -95,7 +97,7 @@ a { text-decoration: none; &:visited { - color: darken($brand-color, 15%); + color: color.adjust($brand-color, $lightness: -15%); } &:hover { @@ -112,7 +114,7 @@ a { blockquote { color: $grey-color; border-left: 4px solid $grey-color-light; - padding-left: $spacing-unit / 2; + padding-left: calc($spacing-unit / 2); font-size: 18px; letter-spacing: -1px; font-style: italic; @@ -167,8 +169,8 @@ pre { @include media-query($on-laptop) { max-width: -webkit-calc(#{$content-width} - (#{$spacing-unit})); max-width: calc(#{$content-width} - (#{$spacing-unit})); - padding-right: $spacing-unit / 2; - padding-left: $spacing-unit / 2; + padding-right: calc($spacing-unit / 2); + padding-left: calc($spacing-unit / 2); } } diff --git a/_sass/_layout.scss b/_sass/_layout.scss index 79b1d7e..582b425 100644 --- a/_sass/_layout.scss +++ b/_sass/_layout.scss @@ -51,7 +51,7 @@ @include media-query($on-palm) { position: absolute; top: 9px; - right: $spacing-unit / 2; + right: calc($spacing-unit / 2); background-color: $background-color; border: 1px solid $grey-color-light; border-radius: 5px; @@ -114,7 +114,7 @@ .footer-heading { font-size: 18px; - margin-bottom: $spacing-unit / 2; + margin-bottom: calc($spacing-unit / 2); } .contact-list, @@ -126,14 +126,14 @@ .footer-col-wrapper { font-size: 15px; color: $grey-color; - margin-left: -$spacing-unit / 2; + margin-left: calc(-1 * $spacing-unit / 2); @extend %clearfix; } .footer-col { float: left; - margin-bottom: $spacing-unit / 2; - padding-left: $spacing-unit / 2; + margin-bottom: calc($spacing-unit / 2); + padding-left: calc($spacing-unit / 2); } .footer-col-1 { diff --git a/css/main.scss b/css/main.scss index cd8d9e3..43ff019 100644 --- a/css/main.scss +++ b/css/main.scss @@ -3,6 +3,8 @@ --- @charset "utf-8"; +@use "sass:color"; +@use "sass:math"; // Our variables @@ -21,8 +23,8 @@ $brand-color: #2a7ae2; $osc-color: #1583bd; $grey-color: #828282; -$grey-color-light: lighten($grey-color, 40%); -$grey-color-dark: darken($grey-color, 25%); +$grey-color-light: color.adjust($grey-color, $lightness: 40%); +$grey-color-dark: color.adjust($grey-color, $lightness: -25%); // Width of the content area $content-width: 800px; @@ -35,8 +37,8 @@ $on-laptop: 800px; // Use media queries like this: // @include media-query($on-palm) { // .wrapper { -// padding-right: $spacing-unit / 2; -// padding-left: $spacing-unit / 2; +// padding-right: calc($spacing-unit / 2); +// padding-left: calc($spacing-unit / 2); // } // } @mixin media-query($device) {