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

Commit

Permalink
feature(select): replace menu with native html select (#2462)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: The template and adapter APIs have changed to take advantage of the native select element; see the MDC Select README for more information.
  • Loading branch information
Matty Goo authored Apr 2, 2018
1 parent a70aa88 commit fcc7341
Show file tree
Hide file tree
Showing 19 changed files with 773 additions and 1,624 deletions.
283 changes: 159 additions & 124 deletions demos/select.html

Large diffs are not rendered by default.

8 changes: 5 additions & 3 deletions demos/select.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
//

@import "./common";
@import "../packages/mdc-list/mdc-list";
@import "../packages/mdc-menu/mdc-menu";
@import "../packages/mdc-select/label/mixins";
@import "../packages/mdc-button/mdc-button";
@import "../packages/mdc-select/mdc-select";

// stylelint-disable selector-class-pattern
Expand All @@ -34,4 +32,8 @@
.demo-select-custom-colors.mdc-select--box {
@include mdc-select-container-fill-color(rgba(blue, .1));
}

.button-container {
margin: 8px 0;
}
// stylelint-enable selector-class-pattern
13 changes: 9 additions & 4 deletions packages/mdc-ripple/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@ function detectEdgePseudoVarBug(windowObj) {
*/

function supportsCssVariables(windowObj, forceRefresh = false) {
let supportsCssVariables = supportsCssVariables_;
if (typeof supportsCssVariables_ === 'boolean' && !forceRefresh) {
return supportsCssVariables_;
return supportsCssVariables;
}

const supportsFunctionPresent = windowObj.CSS && typeof windowObj.CSS.supports === 'function';
Expand All @@ -74,11 +75,15 @@ function supportsCssVariables(windowObj, forceRefresh = false) {
);

if (explicitlySupportsCssVars || weAreFeatureDetectingSafari10plus) {
supportsCssVariables_ = !detectEdgePseudoVarBug(windowObj);
supportsCssVariables = !detectEdgePseudoVarBug(windowObj);
} else {
supportsCssVariables_ = false;
supportsCssVariables = false;
}
return supportsCssVariables_;

if (!forceRefresh) {
supportsCssVariables_ = supportsCssVariables;
}
return supportsCssVariables;
}

//
Expand Down
Loading

0 comments on commit fcc7341

Please sign in to comment.