Skip to content

Commit

Permalink
Toolbar: Set opacity to 1 when focus is within (#1927)
Browse files Browse the repository at this point in the history
This ensures interacting with the toolbar with the keyboard
makes it visible to the user.
  • Loading branch information
mAAdhaTTah authored and RunDevelopment committed Jun 1, 2019
1 parent 7988019 commit 0b1662d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions plugins/toolbar/prism-toolbar.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ div.code-toolbar:hover > .toolbar {
opacity: 1;
}

/* Separate line b/c rules are thrown out if selector is invalid.
IE11 and old Edge versions don't support :focus-within. */
div.code-toolbar:focus-within > .toolbar {
opacity: 1;
}

div.code-toolbar > .toolbar .toolbar-item {
display: inline-block;
}
Expand Down

0 comments on commit 0b1662d

Please sign in to comment.