From 527311c54416e82a9a04a445d8f0f661dd7c7323 Mon Sep 17 00:00:00 2001 From: Andrey Prigogin Date: Tue, 12 Jun 2018 15:57:49 -0700 Subject: [PATCH 1/6] fix(checkbox): support high contrast in FF. --- demos/checkbox.html | 20 ++++++++++---------- packages/mdc-checkbox/README.md | 4 ++-- packages/mdc-checkbox/_mixins.scss | 1 + packages/mdc-checkbox/_variables.scss | 1 - packages/mdc-checkbox/mdc-checkbox.scss | 6 ------ 5 files changed, 13 insertions(+), 19 deletions(-) diff --git a/demos/checkbox.html b/demos/checkbox.html index e15af33d12e..a8378dfbdf8 100644 --- a/demos/checkbox.html +++ b/demos/checkbox.html @@ -67,7 +67,7 @@ viewBox="0 0 24 24">
@@ -89,7 +89,7 @@

CSS Only

viewBox="0 0 24 24">
@@ -118,7 +118,7 @@

CSS Only

viewBox="0 0 24 24">
@@ -137,7 +137,7 @@

CSS Only

viewBox="0 0 24 24">
@@ -160,7 +160,7 @@

CSS Only

viewBox="0 0 24 24">
@@ -180,7 +180,7 @@

CSS Only

viewBox="0 0 24 24">
@@ -205,7 +205,7 @@

With JavaScript

viewBox="0 0 24 24">
@@ -230,7 +230,7 @@

With JavaScript

viewBox="0 0 24 24">
@@ -257,7 +257,7 @@

With JavaScript

viewBox="0 0 24 24">
@@ -281,7 +281,7 @@

With JavaScript

viewBox="0 0 24 24">
diff --git a/packages/mdc-checkbox/README.md b/packages/mdc-checkbox/README.md index 6ea89d73a7c..393b54fd64b 100644 --- a/packages/mdc-checkbox/README.md +++ b/packages/mdc-checkbox/README.md @@ -102,7 +102,7 @@ Note that `mdc-checkbox--disabled` is necessary on the root element of CSS-only viewBox="0 0 24 24">
@@ -149,7 +149,7 @@ Property Name | Type | Description `checked` | Boolean | Setter/getter for the checkbox's checked state `indeterminate` | Boolean | Setter/getter for the checkbox's indeterminate state `disabled` | Boolean | Setter/getter for the checkbox's disabled state -`value` | String | Setter/getter for the checkbox's +`value` | String | Setter/getter for the checkbox's ## Usage within Web Frameworks diff --git a/packages/mdc-checkbox/_mixins.scss b/packages/mdc-checkbox/_mixins.scss index aba23a2fc1c..b637b2c4ca9 100644 --- a/packages/mdc-checkbox/_mixins.scss +++ b/packages/mdc-checkbox/_mixins.scss @@ -322,6 +322,7 @@ width: 100%; transition: mdc-checkbox-transition-exit(opacity, 0ms, $mdc-checkbox-transition-duration * 2); opacity: 0; + stroke: currentColor; .mdc-checkbox--upgraded & { opacity: 1; diff --git a/packages/mdc-checkbox/_variables.scss b/packages/mdc-checkbox/_variables.scss index f112d5e3169..5ba49ff11e1 100644 --- a/packages/mdc-checkbox/_variables.scss +++ b/packages/mdc-checkbox/_variables.scss @@ -17,7 +17,6 @@ @import "@material/theme/variables"; $mdc-checkbox-mark-color: mdc-theme-prop-value(on-primary); -$mdc-checkbox-mark-color-high-contrast-black-on-white: black !default; $mdc-checkbox-border-color: rgba(mdc-theme-prop-value(on-surface), .54); $mdc-checkbox-disabled-color: rgba(mdc-theme-prop-value(on-surface), .26); $mdc-checkbox-baseline-theme-color: secondary; diff --git a/packages/mdc-checkbox/mdc-checkbox.scss b/packages/mdc-checkbox/mdc-checkbox.scss index f927333f81e..e36eac78bb5 100644 --- a/packages/mdc-checkbox/mdc-checkbox.scss +++ b/packages/mdc-checkbox/mdc-checkbox.scss @@ -41,12 +41,6 @@ } } -@media screen and (-ms-high-contrast: black-on-white) { - @at-root { - @include mdc-checkbox-ink-color($mdc-checkbox-mark-color-high-contrast-black-on-white); - } -} - // Needed to disable hover effects on CSS-only (non-JS) checkboxes .mdc-checkbox--disabled { @include mdc-checkbox--disabled_; From d600e504240b32f579a356e4551472e6607cbf4f Mon Sep 17 00:00:00 2001 From: Andrey Prigogin Date: Tue, 12 Jun 2018 16:01:31 -0700 Subject: [PATCH 2/6] fix(checkbox): support high contrast in FF. --- packages/mdc-checkbox/_mixins.scss | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/mdc-checkbox/_mixins.scss b/packages/mdc-checkbox/_mixins.scss index b637b2c4ca9..1789f03ae89 100644 --- a/packages/mdc-checkbox/_mixins.scss +++ b/packages/mdc-checkbox/_mixins.scss @@ -69,10 +69,8 @@ } @mixin mdc-checkbox-ink-color($color) { - .mdc-checkbox__checkmark-path { - // !important is needed here because a stroke must be set as an attribute on the SVG in order - // for line animation to work properly. - @include mdc-theme-prop(stroke, $color, $important: true); + .mdc-checkbox__checkmark { + @include mdc-theme-prop(color, $color); } .mdc-checkbox__mixedmark { From c85c629bf159fd1c84c5e2da479c8ead37420085 Mon Sep 17 00:00:00 2001 From: Andrey Prigogin Date: Wed, 13 Jun 2018 11:12:30 -0700 Subject: [PATCH 3/6] fix(checkbox): support high contrast in FF. --- packages/mdc-checkbox/_mixins.scss | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/mdc-checkbox/_mixins.scss b/packages/mdc-checkbox/_mixins.scss index 1789f03ae89..0ed98b37e19 100644 --- a/packages/mdc-checkbox/_mixins.scss +++ b/packages/mdc-checkbox/_mixins.scss @@ -320,7 +320,6 @@ width: 100%; transition: mdc-checkbox-transition-exit(opacity, 0ms, $mdc-checkbox-transition-duration * 2); opacity: 0; - stroke: currentColor; .mdc-checkbox--upgraded & { opacity: 1; From 593f2491169d2e2fef3f15af6f66de407ef42488 Mon Sep 17 00:00:00 2001 From: Andrey Prigogin Date: Wed, 13 Jun 2018 12:43:40 -0700 Subject: [PATCH 4/6] fix(checkbox): support high contrast in FF. --- demos/button.html | 2 +- demos/card.html | 2 +- demos/dialog.html | 2 +- demos/grid-list.html | 2 +- demos/image-list.html | 4 ++-- demos/list.html | 2 +- demos/snackbar.html | 6 +++--- demos/switch.html | 2 +- demos/theme/index.html | 6 +++--- packages/mdc-checkbox/README.md | 2 +- test/unit/mdc-checkbox/mdc-checkbox.test.js | 2 +- 11 files changed, 16 insertions(+), 16 deletions(-) diff --git a/demos/button.html b/demos/button.html index 64300a2a7d7..8079f5b81ae 100644 --- a/demos/button.html +++ b/demos/button.html @@ -97,7 +97,7 @@
- +
diff --git a/demos/card.html b/demos/card.html index 958eee401a9..227ac0859d6 100644 --- a/demos/card.html +++ b/demos/card.html @@ -83,7 +83,7 @@

by Kurt Wagner

- +
diff --git a/demos/dialog.html b/demos/dialog.html index ec498a9cd7d..40941d2939e 100644 --- a/demos/dialog.html +++ b/demos/dialog.html @@ -178,7 +178,7 @@

viewBox="0 0 24 24">
diff --git a/demos/grid-list.html b/demos/grid-list.html index 235d3d1b4c4..3287895581f 100644 --- a/demos/grid-list.html +++ b/demos/grid-list.html @@ -92,7 +92,7 @@
- +
diff --git a/demos/image-list.html b/demos/image-list.html index eeb7506710a..8025b36385d 100644 --- a/demos/image-list.html +++ b/demos/image-list.html @@ -125,7 +125,7 @@
- +
@@ -139,7 +139,7 @@
- +
diff --git a/demos/list.html b/demos/list.html index e4cab90794c..9d87a192a25 100644 --- a/demos/list.html +++ b/demos/list.html @@ -101,7 +101,7 @@ aria-labelledby="toggle-rtl-label" />
-
diff --git a/demos/snackbar.html b/demos/snackbar.html index 31a868dd091..53964eebe02 100644 --- a/demos/snackbar.html +++ b/demos/snackbar.html @@ -83,7 +83,7 @@

Basic Example

- +
@@ -97,7 +97,7 @@

Basic Example

-
@@ -112,7 +112,7 @@

Basic Example

-
diff --git a/demos/switch.html b/demos/switch.html index 5ff52ad1e57..eb5277f6ab2 100644 --- a/demos/switch.html +++ b/demos/switch.html @@ -121,7 +121,7 @@

Disabled

aria-labelledby="toggle-rtl-label" />
-
diff --git a/demos/theme/index.html b/demos/theme/index.html index 5ff95a18ab0..b96c45b3594 100644 --- a/demos/theme/index.html +++ b/demos/theme/index.html @@ -365,7 +365,7 @@

viewBox="0 0 24 24">
@@ -384,7 +384,7 @@

viewBox="0 0 24 24">
@@ -404,7 +404,7 @@

viewBox="0 0 24 24">
diff --git a/packages/mdc-checkbox/README.md b/packages/mdc-checkbox/README.md index 393b54fd64b..419dafd6c97 100644 --- a/packages/mdc-checkbox/README.md +++ b/packages/mdc-checkbox/README.md @@ -51,7 +51,7 @@ We recommend using MDC Checkbox with [MDC Form Field](../mdc-form-field) for enh viewBox="0 0 24 24">
diff --git a/test/unit/mdc-checkbox/mdc-checkbox.test.js b/test/unit/mdc-checkbox/mdc-checkbox.test.js index c519f177924..989e71f8fdf 100644 --- a/test/unit/mdc-checkbox/mdc-checkbox.test.js +++ b/test/unit/mdc-checkbox/mdc-checkbox.test.js @@ -40,7 +40,7 @@ function getFixture() { viewBox="0 0 24 24">
From 1b7bae805fdda76d9083dfc920166bde952f32b5 Mon Sep 17 00:00:00 2001 From: Andrey Prigogin Date: Wed, 13 Jun 2018 12:49:48 -0700 Subject: [PATCH 5/6] fix(checkbox): support high contrast in FF. --- demos/grid-list.html | 2 +- demos/image-list.html | 4 ++-- demos/list.html | 2 +- demos/snackbar.html | 6 +++--- demos/switch.html | 8 ++++---- demos/theme/index.html | 3 --- packages/mdc-checkbox/README.md | 2 -- packages/mdc-checkbox/_mixins.scss | 1 + test/unit/mdc-checkbox/mdc-checkbox.test.js | 1 - 9 files changed, 12 insertions(+), 17 deletions(-) diff --git a/demos/grid-list.html b/demos/grid-list.html index 3287895581f..c2770853f97 100644 --- a/demos/grid-list.html +++ b/demos/grid-list.html @@ -92,7 +92,7 @@
- +
diff --git a/demos/image-list.html b/demos/image-list.html index 8025b36385d..733c4c29376 100644 --- a/demos/image-list.html +++ b/demos/image-list.html @@ -125,7 +125,7 @@
- +
@@ -139,7 +139,7 @@
- +
diff --git a/demos/list.html b/demos/list.html index 9d87a192a25..6b4e520cdbe 100644 --- a/demos/list.html +++ b/demos/list.html @@ -101,7 +101,7 @@ aria-labelledby="toggle-rtl-label" />
-
diff --git a/demos/snackbar.html b/demos/snackbar.html index 53964eebe02..82d7e40526c 100644 --- a/demos/snackbar.html +++ b/demos/snackbar.html @@ -83,7 +83,7 @@

Basic Example

- +
@@ -97,7 +97,7 @@

Basic Example

-
@@ -112,7 +112,7 @@

Basic Example

-
diff --git a/demos/switch.html b/demos/switch.html index eb5277f6ab2..9f8d8978dfd 100644 --- a/demos/switch.html +++ b/demos/switch.html @@ -83,9 +83,9 @@

Enabled

-
@@ -121,7 +121,7 @@

Disabled

aria-labelledby="toggle-rtl-label" />
-
diff --git a/demos/theme/index.html b/demos/theme/index.html index b96c45b3594..0ef009d2603 100644 --- a/demos/theme/index.html +++ b/demos/theme/index.html @@ -365,7 +365,6 @@

viewBox="0 0 24 24">
@@ -384,7 +383,6 @@

viewBox="0 0 24 24">
@@ -404,7 +402,6 @@

viewBox="0 0 24 24">
diff --git a/packages/mdc-checkbox/README.md b/packages/mdc-checkbox/README.md index 419dafd6c97..709d539ea94 100644 --- a/packages/mdc-checkbox/README.md +++ b/packages/mdc-checkbox/README.md @@ -51,7 +51,6 @@ We recommend using MDC Checkbox with [MDC Form Field](../mdc-form-field) for enh viewBox="0 0 24 24">
@@ -102,7 +101,6 @@ Note that `mdc-checkbox--disabled` is necessary on the root element of CSS-only viewBox="0 0 24 24">
diff --git a/packages/mdc-checkbox/_mixins.scss b/packages/mdc-checkbox/_mixins.scss index 0ed98b37e19..8e713a693a1 100644 --- a/packages/mdc-checkbox/_mixins.scss +++ b/packages/mdc-checkbox/_mixins.scss @@ -350,6 +350,7 @@ 0ms, $mdc-checkbox-transition-duration * 2 ); + stroke: currentColor; stroke-width: $mdc-checkbox-mark-stroke-size * 1.3; stroke-dashoffset: $mdc-checkbox-mark-path-length_; stroke-dasharray: $mdc-checkbox-mark-path-length_; diff --git a/test/unit/mdc-checkbox/mdc-checkbox.test.js b/test/unit/mdc-checkbox/mdc-checkbox.test.js index 989e71f8fdf..4a4bffe39d6 100644 --- a/test/unit/mdc-checkbox/mdc-checkbox.test.js +++ b/test/unit/mdc-checkbox/mdc-checkbox.test.js @@ -40,7 +40,6 @@ function getFixture() { viewBox="0 0 24 24">
From 74b0369d75336f733866ac43a52454c111f51345 Mon Sep 17 00:00:00 2001 From: Andrey Prigogin Date: Wed, 13 Jun 2018 12:53:19 -0700 Subject: [PATCH 6/6] fix(checkbox): support high contrast in FF. --- demos/button.html | 2 +- demos/card.html | 2 +- demos/checkbox.html | 10 ---------- demos/dialog.html | 1 - 4 files changed, 2 insertions(+), 13 deletions(-) diff --git a/demos/button.html b/demos/button.html index 8079f5b81ae..3a3d59cfdab 100644 --- a/demos/button.html +++ b/demos/button.html @@ -97,7 +97,7 @@
- +
diff --git a/demos/card.html b/demos/card.html index 227ac0859d6..ff3ee0dc4d8 100644 --- a/demos/card.html +++ b/demos/card.html @@ -83,7 +83,7 @@

by Kurt Wagner

- +
diff --git a/demos/checkbox.html b/demos/checkbox.html index a8378dfbdf8..7e78e075e4e 100644 --- a/demos/checkbox.html +++ b/demos/checkbox.html @@ -67,7 +67,6 @@ viewBox="0 0 24 24">
@@ -89,7 +88,6 @@

CSS Only

viewBox="0 0 24 24">
@@ -118,7 +116,6 @@

CSS Only

viewBox="0 0 24 24">
@@ -137,7 +134,6 @@

CSS Only

viewBox="0 0 24 24">
@@ -160,7 +156,6 @@

CSS Only

viewBox="0 0 24 24">
@@ -180,7 +175,6 @@

CSS Only

viewBox="0 0 24 24">
@@ -205,7 +199,6 @@

With JavaScript

viewBox="0 0 24 24">
@@ -230,7 +223,6 @@

With JavaScript

viewBox="0 0 24 24">
@@ -257,7 +249,6 @@

With JavaScript

viewBox="0 0 24 24">
@@ -281,7 +272,6 @@

With JavaScript

viewBox="0 0 24 24">
diff --git a/demos/dialog.html b/demos/dialog.html index 40941d2939e..44ecf149f73 100644 --- a/demos/dialog.html +++ b/demos/dialog.html @@ -178,7 +178,6 @@

viewBox="0 0 24 24">