Skip to content

Commit

Permalink
Modularized CSS reset
Browse files Browse the repository at this point in the history
  • Loading branch information
Zaydek Michels-Gualtieri committed Nov 17, 2020
1 parent cea89f9 commit e52b0e5
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 28 deletions.
30 changes: 11 additions & 19 deletions src/duomo/builder.scss
Original file line number Diff line number Diff line change
@@ -1,21 +1,13 @@
@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 reset;
// prettier-ignore
@include preflight.reset;
@include preflight.debugger;
@include preflight.stagger;
// prettier-ignore
Expand Down Expand Up @@ -70,15 +62,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;
}
}
}
}
}
}
3 changes: 1 addition & 2 deletions src/duomo/preflight/index.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@forward "custom-props-from-maps";
@forward "debugger";
@forward "reset";
@forward "stagger";
@forward "tailwind-base";
@forward "vendored-font-smoothing";
10 changes: 10 additions & 0 deletions src/duomo/preflight/reset.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
@use "sass:meta";

@use "tailwind-base" as *;
@use "vendored-font-smoothing" as *;

@mixin reset {
@include meta.load-css("modern-normalize");
@include tailwind-base;
@include vendored-font-smoothing;
}
8 changes: 1 addition & 7 deletions src/duomo/reset.scss
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
@use "preflight";

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

@at-root {
/* purgecss start ignore */
@include reset;
@include preflight.reset;
/* purgecss end ignore */
}

0 comments on commit e52b0e5

Please sign in to comment.