From 241c4cc897601c4814b9a9577447bcacf0471b43 Mon Sep 17 00:00:00 2001 From: "Dan O. Williams" Date: Wed, 3 Apr 2019 16:05:49 -0700 Subject: [PATCH 1/5] Add u-overflow-x() and u-overflow-y() mixins --- .../core/mixins/utilities/_overflow.scss | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/stylesheets/core/mixins/utilities/_overflow.scss b/src/stylesheets/core/mixins/utilities/_overflow.scss index 1100808604..b5d2dfc3a0 100644 --- a/src/stylesheets/core/mixins/utilities/_overflow.scss +++ b/src/stylesheets/core/mixins/utilities/_overflow.scss @@ -8,3 +8,21 @@ } overflow: get-uswds-value(overflow, $value...) #{$important}; } + +@mixin u-overflow-x($value...) { + $important: null; + @if has-important($value) { + $value: remove($value, '!important'); + $important: ' !important'; + } + overflow-x: get-uswds-value(overflow, $value...) #{$important}; +} + +@mixin u-overflow-y($value...) { + $important: null; + @if has-important($value) { + $value: remove($value, '!important'); + $important: ' !important'; + } + overflow-y: get-uswds-value(overflow, $value...) #{$important}; +} From 057ceb180d8fb7838d074fdd671b95d2ba0a4246 Mon Sep 17 00:00:00 2001 From: "Dan O. Williams" Date: Wed, 3 Apr 2019 16:23:12 -0700 Subject: [PATCH 2/5] Fix u-outline() mixin to properly accept strings --- src/stylesheets/core/mixins/utilities/_outline.scss | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/stylesheets/core/mixins/utilities/_outline.scss b/src/stylesheets/core/mixins/utilities/_outline.scss index d590684892..af21701ca7 100644 --- a/src/stylesheets/core/mixins/utilities/_outline.scss +++ b/src/stylesheets/core/mixins/utilities/_outline.scss @@ -1,19 +1,26 @@ // Outputs a solid outline of $value... width @mixin u-outline($value...) { $important: null; + $widths: map-deep-get($system-properties, outline, standard); @if has-important($value) { $value: remove($value, '!important'); $important: ' !important'; } @each $this-value in $value { + $this-value: smart-quote($this-value); $match: false; - @if map-has-key($all-color-shortcodes, smart-quote($this-value)) { + @if map-has-key($all-color-shortcodes, $this-value) { $match: true; outline-color: color(smart-quote($this-value)) #{$important}; } + @else if map-has-key($widths, $this-value) { + $match: true; + $final-value: map-get($widths, $this-value); + outline-width: unquote('#{$final-value}#{$important}'); + outline-style: solid#{$important}; + } @else if type-of($this-value) == 'number' { $converted-value: number-to-token($this-value); - $widths: map-deep-get($system-properties, outline, standard); @if map-has-key($widths, $converted-value) { $match: true; $final-value: map-get($widths, $converted-value); From a7842f65c483163d6e245a6fdab7dc8183b76b32 Mon Sep 17 00:00:00 2001 From: "Dan O. Williams" Date: Wed, 3 Apr 2019 16:23:44 -0700 Subject: [PATCH 3/5] Allow outline to accept 1 unit --- src/stylesheets/core/_properties.scss | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/stylesheets/core/_properties.scss b/src/stylesheets/core/_properties.scss index 11e5bcecfe..fda6fad026 100644 --- a/src/stylesheets/core/_properties.scss +++ b/src/stylesheets/core/_properties.scss @@ -501,7 +501,10 @@ $system-properties: ( standard: map-collect( map-get($system-spacing, 'smaller'), map-get($partial-values, 'zero-zero'), - ('05': spacing-multiple(0.5)) + ( + '05': spacing-multiple(0.5), + 1: spacing-multiple(1) + ) ), extended: (), ), From 6e9196bce2b167b50cd68ba25612bbe1cc18f9aa Mon Sep 17 00:00:00 2001 From: "Dan O. Williams" Date: Wed, 3 Apr 2019 16:29:30 -0700 Subject: [PATCH 4/5] Update package-lock.json --- package-lock.json | 70 ++++++++++++++++++++++++++++++++++------------- 1 file changed, 51 insertions(+), 19 deletions(-) diff --git a/package-lock.json b/package-lock.json index 973d783754..4a1a9b8e3f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7355,7 +7355,8 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true + "dev": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -7379,13 +7380,15 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -7409,13 +7412,15 @@ "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true + "dev": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -7578,6 +7583,7 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -7586,13 +7592,15 @@ "version": "0.0.8", "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true + "dev": true, + "optional": true }, "minipass": { "version": "2.2.4", "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.2.4.tgz", "integrity": "sha512-hzXIWWet/BzWhYs2b+u7dRHlruXhwdgvlTMDKC6Cb1U7ps6Ac6yQlR39xsbjWJE377YTCtKwIXIpJ5oP+j5y8g==", "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.1", "yallist": "^3.0.0" @@ -7613,6 +7621,7 @@ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -7812,7 +7821,8 @@ "version": "5.1.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", - "dev": true + "dev": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -7876,6 +7886,7 @@ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -7924,13 +7935,15 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true + "dev": true, + "optional": true }, "yallist": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.2.tgz", "integrity": "sha1-hFK0u36Dx8GI2AQcGoN8dz1ti7k=", - "dev": true + "dev": true, + "optional": true } } }, @@ -8418,7 +8431,8 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -8439,12 +8453,14 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -8459,17 +8475,20 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -8586,7 +8605,8 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -8598,6 +8618,7 @@ "version": "1.0.0", "bundled": true, "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -8612,6 +8633,7 @@ "version": "3.0.4", "bundled": true, "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -8619,12 +8641,14 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "minipass": { "version": "2.3.5", "bundled": true, "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -8643,6 +8667,7 @@ "version": "0.5.1", "bundled": true, "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -8723,7 +8748,8 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -8735,6 +8761,7 @@ "version": "1.4.0", "bundled": true, "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -8820,7 +8847,8 @@ "safe-buffer": { "version": "5.1.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -8856,6 +8884,7 @@ "version": "1.0.2", "bundled": true, "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -8875,6 +8904,7 @@ "version": "3.0.1", "bundled": true, "dev": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -8918,12 +8948,14 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "yallist": { "version": "3.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true } } }, From 883a9a263f6c0c861e3769aeee059253e09d8e7e Mon Sep 17 00:00:00 2001 From: "Dan O. Williams" Date: Wed, 3 Apr 2019 16:30:49 -0700 Subject: [PATCH 5/5] Revert to disallowing 1 unit in outline --- src/stylesheets/core/_properties.scss | 1 - 1 file changed, 1 deletion(-) diff --git a/src/stylesheets/core/_properties.scss b/src/stylesheets/core/_properties.scss index fda6fad026..7ac2f49f1f 100644 --- a/src/stylesheets/core/_properties.scss +++ b/src/stylesheets/core/_properties.scss @@ -503,7 +503,6 @@ $system-properties: ( map-get($partial-values, 'zero-zero'), ( '05': spacing-multiple(0.5), - 1: spacing-multiple(1) ) ), extended: (),