Skip to content

Commit

Permalink
refactor: address more feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
crisbeto committed Feb 2, 2019
1 parent 16f6e97 commit c1e3272
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 13 deletions.
21 changes: 13 additions & 8 deletions packages/mdc-menu-surface/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,23 +40,24 @@
.mdc-menu-surface {
@include mdc-menu-surface-base_($query);
@include mdc-elevation($z-value: 8, $query: $query);

@include mdc-menu-surface-fill-color(surface, $query);
@include mdc-menu-surface-ink-color(on-surface, $query);
@include mdc-menu-surface-shape-radius(medium, $query);
@include mdc-menu-surface-shape-radius(medium, false, $query);

@include mdc-feature-targets($feat-structure) {
@include mdc-rtl-reflexive-property(transform-origin, top left, top right);
}
}

@include mdc-feature-targets($feat-structure) {
.mdc-menu-surface--anchor {
.mdc-menu-surface--anchor {
@include mdc-feature-targets($feat-structure) {
position: relative;
overflow: visible;
}
}

.mdc-menu-surface--fixed {
.mdc-menu-surface--fixed {
@include mdc-feature-targets($feat-structure) {
position: fixed;
}
}
Expand Down Expand Up @@ -109,13 +110,17 @@
overflow: auto;
will-change: transform, opacity;
z-index: $mdc-menu-surface-z-index;
}

&:focus {
&:focus {
@include mdc-feature-targets($feat-structure) {
outline: none;
}
}

// stylelint-disable-next-line selector-max-type
&--open {
// stylelint-disable-next-line selector-max-type
&--open {
@include mdc-feature-targets($feat-structure) {
display: inline-block;
transform: scale(1);
opacity: 1;
Expand Down
11 changes: 6 additions & 5 deletions test/scss/feature-targeting.scss
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@
@include mdc-menu($query: mdc-feature-any());
@include mdc-menu-width(0, $query: mdc-feature-any());

// Menu surface
@include mdc-menu-surface($query: mdc-feature-any());
@include mdc-menu-surface-fill-color(surface, $query: mdc-feature-any());
@include mdc-menu-surface-ink-color(on-surface, $query: mdc-feature-any());
@include mdc-menu-surface-shape-radius(medium, $query: mdc-feature-any());

// Radio
@include mdc-radio($query: mdc-feature-any());
@include mdc-radio-unchecked-stroke-color(red, $query: mdc-feature-any());
Expand Down Expand Up @@ -79,9 +85,4 @@
@include mdc-switch-toggled-on-thumb-color(on-surface, $query: mdc-feature-any());
@include mdc-switch-toggled-off-track-color(on-surface, $query: mdc-feature-any());
@include mdc-switch-toggled-off-thumb-color(on-surface, $query: mdc-feature-any());

// Menu surface
@include mdc-menu-surface-fill-color(surface, $query: mdc-feature-any());
@include mdc-menu-surface-ink-color(on-surface, $query: mdc-feature-any());
@include mdc-menu-surface-shape-radius(medium, $query: mdc-feature-any());
}

0 comments on commit c1e3272

Please sign in to comment.