Skip to content

Commit

Permalink
modern-normalize is loaded / intergrated as an external dependency now
Browse files Browse the repository at this point in the history
  • Loading branch information
Zaydek Michels-Gualtieri committed Nov 17, 2020
1 parent ce41f97 commit cea89f9
Show file tree
Hide file tree
Showing 7 changed files with 285 additions and 262 deletions.
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
"dist/"
],
"scripts": {
"watch-consumer": "watch --interval 0.1 'yarn -s sass --no-charset src/consumer.scss dist/index.css' src",
"watch-duomo": "watch --interval 0.1 'yarn -s sass --no-charset src/duomo/index.scss dist/index.css' src",
"build-duomo": "sass --no-charset src/duomo/index.scss dist/index.css",
"build-reset": "sass --no-charset src/duomo/reset.scss dist/reset.css",
"watch-consumer": "watch --interval 0.1 'yarn -s sass --load-path=node_modules/modern-normalize --no-charset src/consumer.scss dist/index.css' src",
"watch-duomo": "watch --interval 0.1 'yarn -s sass --load-path=node_modules/modern-normalize --no-charset src/duomo/index.scss dist/index.css' src",
"build-duomo": "sass --load-path=node_modules/modern-normalize --no-charset src/duomo/index.scss dist/index.css",
"build-reset": "sass --load-path=node_modules/modern-normalize --no-charset src/duomo/reset.scss dist/reset.css",
"test": "jest",
"build": "rm -rf dist && yarn test && yarn tsc && yarn build-duomo && yarn build-reset",
"publish-dist-dry-run": "yarn build && npm publish --dry-run"
Expand All @@ -22,6 +22,7 @@
"@types/react": "^16.9.55",
"@types/sass": "^1.16.0",
"jest": "^26.6.3",
"modern-normalize": "^1.0.0",
"prettier": "^2.1.2",
"react": "^17.0.1",
"react-dom": "^17.0.1",
Expand Down
35 changes: 21 additions & 14 deletions src/duomo/builder.scss
Original file line number Diff line number Diff line change
@@ -1,23 +1,30 @@
@use "sass:list";
@use "sass:meta";

@use "configuration";
@use "core";
@use "helpers";
@use "preflight";

@mixin reset {
@include meta.load-css("modern-normalize");
@include preflight.tailwind-base;
@include preflight.vendored-font-smoothing;
}

@mixin preflight {
/* purgecss start ignore */
@include preflight.base;
@include preflight.vendored-font-smoothing;
@include reset;
// prettier-ignore
@include preflight.debugger;
@include preflight.stagger;
// prettier-ignore
@include preflight.custom-props-from-maps(
(map: configuration.$font-family-map),
(map: configuration.$color-map),
(shorthand: "shadow", map: configuration.$shadow-map),
(map: configuration.$timing-function-map),
);
@include preflight.stagger;
@include preflight.debugger;
/* purgecss end ignore */
}

Expand Down Expand Up @@ -63,15 +70,15 @@ $__full-range: list.join(configuration.$negative-range, configuration.$standard-
@if not configuration.$headless {
/*! @zaydek/duomo | MIT License | https://github.com/zaydek/duomo */
@include preflight;
@include props;
@each $key, $value in configuration.$breakpoint-map {
@media (min-width: #{helpers.px($value)}) {
.#{helpers.escape-breakpoint($key)} {
@at-root {
@include props;
}
}
}
}
// @include props;
// @each $key, $value in configuration.$breakpoint-map {
// @media (min-width: #{helpers.px($value)}) {
// .#{helpers.escape-breakpoint($key)} {
// @at-root {
// @include props;
// }
// }
// }
// }
}
}
242 changes: 0 additions & 242 deletions src/duomo/preflight/base.scss

This file was deleted.

2 changes: 1 addition & 1 deletion src/duomo/preflight/index.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@forward "base";
@forward "custom-props-from-maps";
@forward "debugger";
@forward "stagger";
@forward "tailwind-base";
@forward "vendored-font-smoothing";
Loading

0 comments on commit cea89f9

Please sign in to comment.