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

fix(segmented-button): Move include statements to avoid nested classes #6380

Merged
merged 2 commits into from
Aug 14, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions packages/mdc-segmented-button/segment/_segment.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,11 @@
@include touch-target.wrapper($query);
@include elevation.overlay-common($query);

@include _unselected($query);
@include _selected($query);

.mdc-segmented-button__segment {
@include base($query);
@include _unselected($query);

&:hover {
@include feature-targeting.targets($feat-structure) {
Expand Down Expand Up @@ -81,11 +83,6 @@
}
}

// Style for when element is selected
.mdc-segmented-button__segment--selected {
@include _selected($query);
}

// maintains visual design when inside a touch-target-wrapper
// This could also be accomplished with --first/--last classes
.mdc-touch-target-wrapper {
Expand Down Expand Up @@ -126,7 +123,6 @@
@include elevation-theme.overlay-surface-position($query: $query);
@include elevation-theme.overlay-dimensions(100%, $query: $query);
@include typography.typography(button, $query);
@include segment-theme.outline-color(segment-theme.$outline-color, $query);
@include feature-targeting.targets($feat-structure) {
display: inline-flex;
vertical-align: top;
Expand All @@ -140,6 +136,7 @@
}

@mixin _unselected($query: feature-targeting.all()) {
@include segment-theme.outline-color(segment-theme.$outline-color, $query);
@include segment-theme.unselected-ink-color(
segment-theme.$unselected-ink-color,
$query
Expand Down