Skip to content
This repository was archived by the owner on Jan 13, 2025. It is now read-only.

Commit c928bce

Browse files
author
Matty Goo
authored
feat(select): removed dark theme (#2098)
1 parent ffca02d commit c928bce

File tree

3 files changed

+4
-37
lines changed

3 files changed

+4
-37
lines changed

demos/select.html

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,6 @@
2626
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500">
2727
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
2828
<style>
29-
.mdc-theme--dark {
30-
background-color: #303030;
31-
}
32-
3329
#demo-wrapper {
3430
padding: 4px;
3531
padding-left: 0;
@@ -125,10 +121,6 @@ <h2 class="mdc-typography--title">Fully-Featured Component</h2>
125121
</div>
126122
</section>
127123
<p>Currently selected: <span id="box-currently-selected">(none)</span></p>
128-
<div>
129-
<input type="checkbox" id="dark-theme">
130-
<label for="dark-theme">Dark Theme</label>
131-
</div>
132124
<div>
133125
<input type="checkbox" id="rtl">
134126
<label for="rtl">RTL</label>
@@ -187,7 +179,6 @@ <h2 class="mdc-typography--title">CSS Only</h2>
187179
});
188180

189181
var boxDemoWrapper = document.getElementById('box-demo-wrapper');
190-
var darkThemeCb = document.getElementById('dark-theme');
191182
var rtlCb = document.getElementById('rtl');
192183
var alternateColorsCb = document.getElementById('alternate-colors');
193184
var disabledCb = document.getElementById('disabled');
@@ -197,9 +188,6 @@ <h2 class="mdc-typography--title">CSS Only</h2>
197188
var cssAlternateColors = document.getElementById('css-alternate-colors');
198189
var cssDisabled = document.getElementById('css-disabled');
199190

200-
darkThemeCb.addEventListener('change', function() {
201-
boxDemoWrapper.classList[darkThemeCb.checked ? 'add' : 'remove']('mdc-theme--dark');
202-
});
203191
rtlCb.addEventListener('change', function() {
204192
if (rtlCb.checked) {
205193
boxDemoWrapper.setAttribute('dir', 'rtl');

packages/mdc-select/README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -239,13 +239,13 @@ It is advised that dividers also set `role="presentation"` to disable selection
239239

240240
### Sass Mixins
241241

242-
To customize the colors of any part of the select, use the following mixins. We recommend you use
243-
these mixins within CSS selectors like `.foo-select` to apply styling.
242+
To customize the colors of any part of the select, use the following mixins. We recommend you use
243+
these mixins within CSS selectors like `.foo-select` to apply styling.
244244

245245
Mixin | Description
246246
--- | ---
247247
`mdc-select-ink-color($color)` | Customizes the color of the selected item displayed in the select. On the css version, this also customizes the color of the label.
248-
`mdc-select-container-fill-color($color)` | Customizes the background color of the select.
248+
`mdc-select-container-fill-color($color)` | Customizes the background color of the select.
249249
`mdc-select-label-color($color)` | Customizes the label color of the select in the unfocused state. This mixin is only used for the JS version of the select.
250250
`mdc-select-focused-label-color($color, $opacity: 0.87)` | Customizes the label color of the select when focused. Changing opacity for the label when floating is optional.
251251
`mdc-select-bottom-line-color($color)` | Customizes the color of the default bottom line of the select.
@@ -392,8 +392,7 @@ Enables/disables the select.
392392

393393
## Theming
394394

395-
The select's bottom border is set to the current theme's primary color when focused. The select is
396-
fully dark theme aware.
395+
The select's bottom border is set to the current theme's primary color when focused.
397396

398397
## Tips / Tricks
399398

packages/mdc-select/mdc-select.scss

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
@import "@material/animation/functions";
1919
@import "@material/animation/variables";
2020
@import "@material/typography/mixins";
21-
@import "@material/theme/mixins";
2221
@import "@material/ripple/common";
2322
@import "@material/ripple/mixins";
2423
@import "@material/rtl/mixins";
@@ -74,10 +73,6 @@ $mdc-select-menu-transition: transform 180ms $mdc-animation-standard-curve-timin
7473
@include mdc-ripple-radius;
7574
@include mdc-states;
7675

77-
@include mdc-theme-dark(".mdc-select") {
78-
@include mdc-states(white);
79-
}
80-
8176
&::-ms-expand {
8277
display: none;
8378
}
@@ -166,10 +161,6 @@ $mdc-select-menu-transition: transform 180ms $mdc-animation-standard-curve-timin
166161
.mdc-select--open {
167162
.mdc-select__surface::before {
168163
opacity: map-get($mdc-ripple-dark-ink-opacities, "focus");
169-
170-
@include mdc-theme-dark(".mdc-select") {
171-
opacity: map-get($mdc-ripple-light-ink-opacities, "focus");
172-
}
173164
}
174165

175166
.mdc-select__selected-text {
@@ -206,17 +197,6 @@ $mdc-select-menu-transition: transform 180ms $mdc-animation-standard-curve-timin
206197
}
207198
}
208199

209-
@each $sel in ("mdc-select--disabled", "mdc-select[disabled]") {
210-
.#{$sel} {
211-
@include mdc-theme-dark(".mdc-select", true) {
212-
@include mdc-theme-prop(color, text-disabled-on-dark);
213-
@include mdc-select-dd-arrow-svg-bg_(ffffff, .38);
214-
215-
border-bottom: 1px dotted rgba(white, .38);
216-
}
217-
}
218-
}
219-
220200
// postcss-bem-linter: end
221201

222202
.mdc-select-scroll-lock {

0 commit comments

Comments
 (0)