Avoid duplicating generated CSS by splitting SASS into separate files

This commit is contained in:
Danila Fedorin 2020-03-08 00:35:11 -08:00
parent 0eb1abd26d
commit 8a48a110ff
6 changed files with 35 additions and 28 deletions

View File

@ -1,4 +1,5 @@
@import "style.scss"; @import "variables.scss";
@import "mixins.scss";
.gmachine-instruction { .gmachine-instruction {
display: flex; display: flex;

View File

@ -1,4 +1,5 @@
@import "style.scss"; @import "variables.scss";
@import "mixins.scss";
.stack { .stack {
display: flex; display: flex;

View File

@ -0,0 +1,13 @@
@import "variables.scss";
@mixin bordered-block {
border: $standard-border;
border-radius: .2rem;
}
@mixin below-container-width {
@media screen and (max-width: $container-width){
@content;
}
}

View File

@ -1,4 +1,5 @@
@import "style.scss"; @import "variables.scss";
@import "mixins.scss";
$sidenote-accommodate-shrink: 10rem; $sidenote-accommodate-shrink: 10rem;
$sidenote-width: 30rem; $sidenote-width: 30rem;

View File

@ -1,28 +1,5 @@
$container-width: 45rem; @import "variables.scss";
$standard-border-width: .075rem; @import "mixins.scss";
$primary-color: #36e281;
$primary-color-dark: darken($primary-color, 10%);
$code-color: #f0f0f0;
$code-color-dark: darken($code-color, 10%);
$border-color: #bfbfbf;
$font-heading: "Lora", serif;
$font-body: "Raleway", serif;
$font-code: "Inconsolata", monospace;
$standard-border: $standard-border-width solid $border-color;
@mixin bordered-block {
border: $standard-border;
border-radius: .2rem;
}
@mixin below-container-width {
@media screen and (max-width: $container-width){
@content;
}
}
body { body {
font-family: $font-body; font-family: $font-body;

View File

@ -0,0 +1,14 @@
$container-width: 45rem;
$standard-border-width: .075rem;
$primary-color: #36e281;
$primary-color-dark: darken($primary-color, 10%);
$code-color: #f0f0f0;
$code-color-dark: darken($code-color, 10%);
$border-color: #bfbfbf;
$font-heading: "Lora", serif;
$font-body: "Raleway", serif;
$font-code: "Inconsolata", monospace;
$standard-border: $standard-border-width solid $border-color;