Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10
16.20.2
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After upgrading some packages, running with node 16 seems to be stable. Probably best to run with a more recent version and match version the datastax-docs-site repo uses

1 change: 1 addition & 0 deletions .stylelintrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"rules": {
"comment-empty-line-before": null,
"no-descending-specificity": null,
"at-rule-no-unknown": [true, { "ignoreAtRules": ["include", "mixin", "extend", "content", "if", "else", "for", "each", "while", "function", "return", "warn", "error", "debug"]}]
}
}
9 changes: 5 additions & 4 deletions gulp.d/tasks/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ const ospath = require('path')
const path = ospath.posix
const postcss = require('gulp-postcss')
const postcssCalc = require('postcss-calc')
const postcssNesting = require('postcss-nesting')
const postcssNested = require('postcss-nested')
const postcssAdvancedVars = require('postcss-advanced-variables')
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

postcss-advanced-variables gives us mixins

const postcssImport = require('postcss-import')
const postcssUrl = require('postcss-url')
const postcssVar = require('postcss-custom-properties')
Expand Down Expand Up @@ -48,9 +49,9 @@ module.exports = (src, dest, preview) => () => {
},
},
]),
postcssNesting,
// NOTE because css vars are our theme switching mechanism we must preserve them with preserve: true
postcssVar({ preserve: true }),
postcssNested,
postcssAdvancedVars,
postcssVar({ preserve: preview }),
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

after upgrading postcss-custom-variables and npm this works properly now when preserve is false for the production bundle

// NOTE to make vars.css available to all top-level stylesheets, use the next line in place of the previous one
//postcssVar({ importFrom: path.join(src, 'css', 'vars.css'), preserve: preview }),
preview ? postcssCalc : () => {}, // cssnano already applies postcssCalc
Expand Down
Loading