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

Polish site button focus/hover styles in post and site editor #29888

Merged
merged 2 commits into from
Mar 18, 2021
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Developer notes: these rules are duplicated for the site editor.
// They need to be updated in both places.

.edit-post-fullscreen-mode-close.has-icon {
// Do not show the toolbar icon on small screens,
// when Fullscreen Mode is not an option in the "More" menu.
Expand All @@ -23,7 +26,9 @@
box-shadow: none;
}

&:focus::before {
&::before {
transition: box-shadow 0.1s ease;
@include reduce-motion("transition");
content: "";
display: block;
position: absolute;
Expand All @@ -32,8 +37,16 @@
bottom: 9px;
left: 9px;
border-radius: $radius-block-ui + $border-width + $border-width;
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) #23282e;
}

// Lightened spot color focus.
// Hover color.
&:hover::before {
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) $gray-700;
}

// Lightened spot color focus.
&:focus::before {
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) rgba($white, 0.1), inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@
}

.edit-site-navigation-panel__back-to-dashboard.components-button.is-tertiary {
border-radius: 0;
height: $button-size;
margin-top: $grid-unit-30;
padding: $grid-unit $grid-unit-20 $grid-unit $grid-unit;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Developer notes: these rules are duplicated for the post editor.
// They need to be updated in both places.

.edit-site-navigation-toggle {
align-items: center;
background: $gray-900;
Expand All @@ -21,19 +24,42 @@
&.has-icon {
min-width: $header-height;

&:hover {
background: #32373d; // WP-admin light-gray.
color: $white;
}
&:hover,
&:active {
color: $white;
}

&:focus {
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color), inset 0 0 0 3px $white;
box-shadow: none;
}

&::before {
transition: box-shadow 0.1s ease;
@include reduce-motion("transition");
content: "";
display: block;
position: absolute;
top: 9px;
right: 9px;
bottom: 9px;
left: 9px;
border-radius: $radius-block-ui + $border-width + $border-width;
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) #23282e;
}

// Hover color.
&:hover::before {
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) $gray-700;
}

// Lightened spot color focus.
&:focus::before {
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) rgba($white, 0.1), inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
}
}
}

.edit-site-navigation-toggle__site-icon {
width: 36px;
width: $button-size;
border-radius: $radius-block-ui;
}