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 focus rectangle regression #942

Merged
merged 5 commits into from
Jun 3, 2017
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
16 changes: 8 additions & 8 deletions components/icon-button/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
position: relative;
width: $icon-button-size; // show only icon on small breakpoints
overflow: hidden;
border-radius: 4px;

.dashicon {
flex: 0 0 auto;
Expand All @@ -25,13 +26,12 @@
}
}

&:focus:before {
content: '';
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
box-shadow: 0 0 0 1px #5b9dd9, 0 0 2px 1px rgba(30, 140, 190, .8);
&:focus {
box-shadow: 0 0 0 1px $blue-medium-400, 0 0 2px 1px $blue-medium-400;
outline: none;
}

&:active:focus {
box-shadow: none;
}
}
15 changes: 6 additions & 9 deletions components/toolbar/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,20 @@
box-sizing: content-box;
}

&:focus:before {
top: -4px;
right: -4px;
bottom: -4px;
left: -4px;
}

&.is-active svg,
&:hover svg,
&:not(:disabled):hover svg {
&:not(:disabled):hover svg,
&:focus svg {
border: 1px solid $dark-gray-500;
color: $dark-gray-500;
}

&:hover,
&:not(:disabled):hover {
&:not(:disabled):hover,
&:focus {
color: $dark-gray-500;
outline: none;
box-shadow: none;
}

&.is-active svg,
Expand Down
1 change: 1 addition & 0 deletions editor/block-mover/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
cursor: pointer;
width: 20px;
height: 20px;
border-radius: 50%;

&:hover {
color: $dark-gray-900;
Expand Down
3 changes: 3 additions & 0 deletions editor/block-switcher/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
width: auto;
margin: 0;
padding: 8px;
border-radius: 0;

&:focus:before {
top: -3px;
Expand Down Expand Up @@ -42,12 +43,14 @@
background: none;
border: 1px solid transparent;
outline: none;
border-radius: 0;
color: $dark-gray-500;
cursor: pointer;

&:hover,
&:focus,
&:not(:disabled):hover {
box-shadow: none;
color: $dark-gray-500;
border-color: $dark-gray-500;
}
Expand Down
4 changes: 4 additions & 0 deletions editor/inserter/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
outline: none;
transition: color .2s ease;

.editor-layout__content & {
border-radius: $icon-button-size / 2;
}

&:hover,
&:focus {
color: $blue-medium-500;
Expand Down
1 change: 0 additions & 1 deletion editor/sidebar/post-schedule/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
color: $blue-wordpress;

&:focus {
box-shadow: none;
outline: none;
}

Expand Down
1 change: 0 additions & 1 deletion editor/sidebar/post-visibility/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
color: $blue-wordpress;

&:focus {
box-shadow: none;
outline: none;
}

Expand Down