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

Try new button outline & focus styles #4512

Merged
merged 6 commits into from
Jan 18, 2018
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
10 changes: 10 additions & 0 deletions components/icon-button/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,14 @@
&:not( :disabled ):hover {
@include button-style__hover;
}

&:not( :disabled ):active {
@include button-style__active;
}

&[aria-disabled=true]:focus,
&:disabled:focus {
box-shadow: none;
}

}
17 changes: 11 additions & 6 deletions editor/assets/stylesheets/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -121,27 +121,32 @@ $float-margin: calc( 50% - #{ $visual-editor-max-width-padding / 2 } );
}

@mixin button-style__hover {
color: $dark-gray-900; // previously $blue-medium-500
color: $dark-gray-900;
box-shadow: inset 0 0 0 1px $light-gray-500, inset 0 0 0 2px $white, 0 1px 1px rgba( $dark-gray-900, .2 );
}

@mixin button-style__active() {
outline: none;
color: $dark-gray-900;
box-shadow: inset 0 0 0 1px $light-gray-700, inset 0 0 0 2px $white;
}

@mixin button-style__focus-active() {
outline: none;
box-shadow: inset 0 0 0 1px $dark-gray-500, inset 0 0 0 2px $white;
color: $dark-gray-900;
background: $light-gray-300;
box-shadow: inset 0 0 0 1px $dark-gray-300, inset 0 0 0 2px $white;
}

@mixin tab-style__focus-active() {
outline: none;
box-shadow: 0 0 0 1px $dark-gray-500;
color: $dark-gray-900;
background: $light-gray-300;
box-shadow: inset 0 0 0 1px $dark-gray-300;
}

@mixin input-style__focus-active() {
outline: none;
box-shadow: 0 0 0 1px $dark-gray-500;
color: $dark-gray-900;
box-shadow: 0 0 0 1px $dark-gray-300;
}

/**
Expand Down
1 change: 1 addition & 0 deletions editor/assets/stylesheets/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ body.gutenberg-editor-page {

svg {
fill: currentColor;
outline: none;
}

ul#adminmenu a.wp-has-current-submenu:after,
Expand Down
16 changes: 12 additions & 4 deletions editor/components/block-mover/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,19 @@
pointer-events: none;
}

.dashicon {
display: block;
}

&:first-child {
margin-bottom: 4px;
}

&:not(:disabled):hover {
@include button-style__hover;
}

&:not(:disabled):active {
@include button-style__active;
}

&:not(:disabled):focus {
@include button-style__focus-active;
}
}
5 changes: 4 additions & 1 deletion editor/components/block-settings-menu/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@
.editor-block-settings-menu__toggle {
border-radius: 50%;
padding: 3px;
transform: rotate( 90deg );
width: auto;

.dashicon {
transform: rotate( 90deg );
}
}

.editor-block-settings-menu__control {
Expand Down
1 change: 1 addition & 0 deletions editor/edit-post/header/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
left: 1px;
}

&.is-toggled:hover,
&.is-toggled:focus {
outline: none;
box-shadow: 0 0 0 1px $dark-gray-500, inset 0 0 0 1px $white;
Expand Down