Skip to content

Commit

Permalink
Fixed a bug in base.scss and made $extended-color-map the default for…
Browse files Browse the repository at this point in the history
… getters
  • Loading branch information
Zaydek Michels-Gualtieri committed Nov 16, 2020
1 parent 15c5373 commit ce41f97
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
6 changes: 5 additions & 1 deletion src/consumer.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@use "duomo" as * with (
// $headless: true,
$headless: true,
$separator: ".",
$xl: 1344,
$breakpoint-map: (
Expand All @@ -13,6 +13,10 @@
$opacity-range: (0.5)
);

.font-sans {
font-family: font-family(sans-serif);
}

// Exports:
//
// $headless
Expand Down
8 changes: 4 additions & 4 deletions src/duomo/helpers/getters.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
}

// prettier-ignore
@function font($key) {
@function font-family($key) {
@return __getter(
"font",
configuration.$font-map,
configuration.$font-family-map,
$key,
);
}
Expand All @@ -23,13 +23,13 @@
@function color($key) {
@return __getter(
"color",
configuration.$color-map,
configuration.$extended-color-map,
$key,
);
}

// prettier-ignore
@function shadow($key) {
@function box-shadow($key) {
@return __getter(
"shadow",
configuration.$shadow-map,
Expand Down
12 changes: 5 additions & 7 deletions src/duomo/preflight/base.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
@use "sass:map";

@use "../configuration";
@use "../helpers/getters" as *;

@mixin base {
/**
Expand Down Expand Up @@ -68,7 +66,7 @@
*/

html {
font-family: #{map.get(configuration.$font-family-map, "sans")}; /* 1 */
font-family: font-family(sans-serif); /* 1 */
line-height: 1.5; /* 2 */
}

Expand Down Expand Up @@ -114,7 +112,7 @@
box-sizing: border-box; /* 1 */
border-width: 0; /* 2 */
border-style: solid; /* 2 */
border-color: #{map.get(configuration.$color-map, "cool-gray-200")}; /* 2 */
border-color: color(cool-gray-200); /* 2 */
}

/*
Expand Down Expand Up @@ -145,7 +143,7 @@

input::placeholder,
textarea::placeholder {
color: #{map.get(configuration.$color-map, "cool-gray-400")};
color: color(cool-gray-400);
}

button,
Expand Down Expand Up @@ -206,7 +204,7 @@
code,
kbd,
samp {
font-family: #{map.get(configuration.$font-family-map, "mono")};
font-family: font-family(monospace);
}

/**
Expand Down

0 comments on commit ce41f97

Please sign in to comment.