Skip to content

Commit d471ee3

Browse files
update nvmrc with updated postcss deps, use mixins for theme, fix build, change theme scripts, preload fonts (#8)
1 parent ab9b789 commit d471ee3

File tree

12 files changed

+18252
-826
lines changed

12 files changed

+18252
-826
lines changed

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
10
1+
16.20.2

.stylelintrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
"rules": {
44
"comment-empty-line-before": null,
55
"no-descending-specificity": null,
6+
"at-rule-no-unknown": [true, { "ignoreAtRules": ["include", "mixin", "extend", "content", "if", "else", "for", "each", "while", "function", "return", "warn", "error", "debug"]}]
67
}
78
}

gulp.d/tasks/build.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ const ospath = require('path')
1111
const path = ospath.posix
1212
const postcss = require('gulp-postcss')
1313
const postcssCalc = require('postcss-calc')
14-
const postcssNesting = require('postcss-nesting')
14+
const postcssNested = require('postcss-nested')
15+
const postcssAdvancedVars = require('postcss-advanced-variables')
1516
const postcssImport = require('postcss-import')
1617
const postcssUrl = require('postcss-url')
1718
const postcssVar = require('postcss-custom-properties')
@@ -48,9 +49,9 @@ module.exports = (src, dest, preview) => () => {
4849
},
4950
},
5051
]),
51-
postcssNesting,
52-
// NOTE because css vars are our theme switching mechanism we must preserve them with preserve: true
53-
postcssVar({ preserve: true }),
52+
postcssNested,
53+
postcssAdvancedVars,
54+
postcssVar({ preserve: preview }),
5455
// NOTE to make vars.css available to all top-level stylesheets, use the next line in place of the previous one
5556
//postcssVar({ importFrom: path.join(src, 'css', 'vars.css'), preserve: preview }),
5657
preview ? postcssCalc : () => {}, // cssnano already applies postcssCalc

0 commit comments

Comments
 (0)