Skip to content

Commit

Permalink
fix: Booleans in dist/scssVariables
Browse files Browse the repository at this point in the history
I forgot that `Boolean(variable)` only checks if something is considered
truthy and does not convert the string "false" to false.
  • Loading branch information
mlaursen committed Jul 12, 2020
1 parent 547877c commit f6d43a3
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/dev-utils/src/utils/getCompiledScssVariable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function parse(value: CompiledScssValue): CompiledScssValue {
}

if (/^(true|false)$/i.test(value)) {
return Boolean(value);
return value === "true";
}

const number = parseFloat(value);
Expand Down
2 changes: 1 addition & 1 deletion packages/icon/src/scssVariables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
"rmd-icon-size": "1.5rem",
"rmd-icon-dense-size": "1.25rem",
"rmd-icon-include-dense": true,
"rmd-icon-material-icons-font": true,
"rmd-icon-material-icons-font": false,
"rmd-icon-use-font-icons": true,
"rmd-icon-use-svg-icons": true,
"rmd-icon-spacing-with-text": "0.5rem",
Expand Down
4 changes: 2 additions & 2 deletions packages/theme/src/scssVariables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -550,8 +550,8 @@ export default {
"blue-grey",
],
"rmd-theme-no-css-variables-fallback": true,
"rmd-theme-define-colors-with-rgba": true,
"rmd-theme-dark-elevation": true,
"rmd-theme-define-colors-with-rgba": false,
"rmd-theme-dark-elevation": false,
"rmd-theme-light": true,
"rmd-theme-primary": "#9c27b0",
"rmd-theme-on-primary": "#000",
Expand Down
4 changes: 2 additions & 2 deletions packages/utils/src/scssVariables.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/** this is an auto-generated file from @react-md/dev-utils */
export default {
"rmd-utils-ios-scroll-momentum": true,
"rmd-utils-auto-dense": true,
"rmd-utils-auto-dense": false,
"rmd-utils-enable-rtl": true,
"rmd-utils-temporary-element-z-index": 30,
"rmd-utils-swappable-positions": ["top", "right", "bottom", "left"],
"rmd-utils-swappable-position-prefixes": ["border", "margin", "padding"],
"rmd-utils-skip-validation": true,
"rmd-utils-skip-validation": false,
"rmd-utils-fix-moz-focus": true,
"rmd-utils-phone-max-width": "47.9375em",
"rmd-utils-tablet-min-width": "48em",
Expand Down

0 comments on commit f6d43a3

Please sign in to comment.