Skip to content

Commit

Permalink
Add button focus style (#838)
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix committed May 19, 2017
1 parent dbc228e commit 7492855
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 4 deletions.
4 changes: 0 additions & 4 deletions components/button/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,4 @@
&:disabled {
opacity: 0.6;
}

&:focus {
box-shadow: none;
}
}
11 changes: 11 additions & 0 deletions components/icon-button/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
border: none;
background: none;
color: $dark-gray-500;
position: relative;

&:not( :disabled ) {
cursor: pointer;
Expand All @@ -13,4 +14,14 @@
color: $blue-medium;
}
}

&: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);
}
}
7 changes: 7 additions & 0 deletions components/toolbar/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@
margin-left: 3px;
}

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

&.is-active,
&:hover,
&:not(:disabled):hover {
Expand Down
7 changes: 7 additions & 0 deletions editor/block-switcher/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@
width: auto;
margin: 3px;
padding: 6px;

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

.editor-block-switcher__menu {
Expand Down

0 comments on commit 7492855

Please sign in to comment.