From dee5055198f2622eeaa6ad089f0d052157b3d470 Mon Sep 17 00:00:00 2001 From: Matty Goo Date: Tue, 23 Jan 2018 13:57:10 -0800 Subject: [PATCH] feat(button): removed dark theme from buttons (#2038) --- demos/button.html | 30 ------------------------------ demos/button.scss | 15 --------------- demos/common.scss | 1 + packages/mdc-button/_mixins.scss | 13 ------------- packages/mdc-theme/_mixins.scss | 2 ++ 5 files changed, 3 insertions(+), 58 deletions(-) diff --git a/demos/button.html b/demos/button.html index 2eebcfd7c50..e18ae5b9ece 100644 --- a/demos/button.html +++ b/demos/button.html @@ -30,14 +30,6 @@ padding-bottom: 100px; } - .demo-wrapper.mdc-theme--dark{ - background-color: #333; - } - - .demo-wrapper.mdc-theme--dark fieldset legend, .demo-wrapper.mdc-theme--dark h1 { - color: #f0f0f0; - } - fieldset { padding: 24px; padding-top: 0; @@ -102,19 +94,6 @@
-
-
- -
- - - -
-
-
- -
-
@@ -364,15 +343,6 @@

CSS Only

mdc.ripple.MDCRipple.attachTo(btn); } - var demoWrapper = document.querySelector('.demo-wrapper'); - document.getElementById('toggle-dark').addEventListener('change', function() { - if (this.checked) { - demoWrapper.classList.add('mdc-theme--dark'); - } else { - demoWrapper.classList.remove('mdc-theme--dark'); - } - }); - document.getElementById('toggle-disabled').addEventListener('change', function() { var isDisabled = this.checked; [].forEach.call(document.querySelectorAll('button'), function(button) { diff --git a/demos/button.scss b/demos/button.scss index 2ea8db3b321..dc1990dec54 100644 --- a/demos/button.scss +++ b/demos/button.scss @@ -25,31 +25,16 @@ .mdc-button.secondary-text-button { @include mdc-button-ink-color($mdc-theme-secondary); @include mdc-states(secondary); - - @include mdc-theme-dark(".mdc-button") { - @include mdc-button-ink-color($mdc-theme-secondary); - @include mdc-states(secondary); - } } .mdc-button.secondary-filled-button { @include mdc-button-filled-accessible($mdc-theme-secondary); - - @include mdc-theme-dark(".mdc-button") { - @include mdc-button-filled-accessible($mdc-theme-secondary); - } } .mdc-button.secondary-stroked-button { @include mdc-button-ink-color($mdc-theme-secondary); @include mdc-button-stroke-color($mdc-theme-secondary); - @include mdc-states(secondary); - @include mdc-theme-dark(".mdc-button") { - @include mdc-button-ink-color($mdc-theme-secondary); - @include mdc-button-stroke-color($mdc-theme-secondary); - @include mdc-states(secondary); - } } .mdc-button.big-round-corner-button { diff --git a/demos/common.scss b/demos/common.scss index 1e91179864c..2c5fc185dd8 100644 --- a/demos/common.scss +++ b/demos/common.scss @@ -47,6 +47,7 @@ fieldset { border: 0; } +// TODO mgoo: remove these dark theme when complete with removing other components .mdc-button { @include mdc-theme-dark { @include mdc-button-ink-color($dark-button-color); diff --git a/packages/mdc-button/_mixins.scss b/packages/mdc-button/_mixins.scss index 7df15b06ba9..a8cee7f370e 100644 --- a/packages/mdc-button/_mixins.scss +++ b/packages/mdc-button/_mixins.scss @@ -123,10 +123,6 @@ cursor: default; pointer-events: none; - - @include mdc-theme-dark(".mdc-button") { - @include mdc-theme-prop(color, text-disabled-on-dark); - } } } @@ -145,10 +141,6 @@ &:disabled { @include mdc-theme-prop(border-color, text-disabled-on-light); - - @include mdc-theme-dark(".mdc-button") { - @include mdc-theme-prop(border-color, text-disabled-on-dark); - } } } @@ -156,11 +148,6 @@ &:disabled { @include mdc-theme-prop(background-color, rgba(black, .12)); @include mdc-theme-prop(color, text-disabled-on-light); - - @include mdc-theme-dark(".mdc-button") { - @include mdc-theme-prop(background-color, rgba(white, .12)); - @include mdc-theme-prop(color, text-disabled-on-light); - } } } diff --git a/packages/mdc-theme/_mixins.scss b/packages/mdc-theme/_mixins.scss index 65e2ab207d0..92e45906f30 100644 --- a/packages/mdc-theme/_mixins.scss +++ b/packages/mdc-theme/_mixins.scss @@ -109,6 +109,8 @@ // } // } // ``` + +// TODO: matt goo - remove this once all dark theme is removed @mixin mdc-theme-dark($root-selector: null, $compound: false) { @if ($root-selector) { @at-root {