Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #7082 multiple hover styles #7104

Merged
merged 2 commits into from
Jun 19, 2018
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
16 changes: 10 additions & 6 deletions components/toolbar/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ div.components-toolbar {
width: $icon-button-size;
height: $icon-button-size;

// unset icon button styles
// Unset icon button styles
&:active,
&:not( [aria-disabled="true"] ):hover,
&:not( [aria-disabled="true"] ):focus {
Expand All @@ -55,7 +55,7 @@ div.components-toolbar {
border: none;
}

// disabled
// Disabled
&:disabled {
cursor: default;
}
Expand All @@ -66,7 +66,7 @@ div.components-toolbar {
border-radius: $button-style__radius-roundrect;
}

// subscript for numbered icon buttons, like headings
// Subscript for numbered icon buttons, like headings
&[data-subscript] svg {
padding: 4px 8px 4px 0;
}
Expand All @@ -81,13 +81,17 @@ div.components-toolbar {
bottom: 8px;
}

// hover style
// Assign hover style to child element, not the button itself
&:not( :disabled ):not([aria-disabled="true"]):hover {
box-shadow: none;
}

&:not( :disabled ).is-active > svg,
&:not( :disabled ):hover > svg {
@include formatting-button-style__hover;
}

// active & toggled style
// Active & toggled style
&:not(:disabled).is-active > svg {
@include formatting-button-style__active;
}
Expand All @@ -96,7 +100,7 @@ div.components-toolbar {
color: $white;
}

// focus style
// Focus style
&:not(:disabled):focus > svg {
@include formatting-button-style__focus;
}
Expand Down