Skip to content

Commit

Permalink
Merge pull request #752 from mattico/icon-margin-padding
Browse files Browse the repository at this point in the history
Icon button hit-test dead-space fix
  • Loading branch information
mattico authored Jul 31, 2018
2 parents 76c1c9e + 512826c commit 8ba1830
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/theme/book.js
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ function playpen_text(playpen) {

themePopup.addEventListener('focusout', function(e) {
// e.relatedTarget is null in Safari and Firefox on macOS (see workaround below)
if (!!e.relatedTarget && !themePopup.contains(e.relatedTarget)) {
if (!!e.relatedTarget && !themeToggleButton.contains(e.relatedTarget) && !themePopup.contains(e.relatedTarget)) {
hideThemes();
}
});
Expand Down
14 changes: 10 additions & 4 deletions src/theme/css/chrome.css
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ a > .hljs {
}
#menu-bar i, #menu-bar .icon-button {
position: relative;
margin: 0 8px;
padding: 0 8px;
z-index: 10;
line-height: 50px;
cursor: pointer;
transition: color 0.5s;
}
@media only screen and (max-width: 420px) {
#menu-bar i, #menu-bar .icon-button {
margin: 0 5px;
padding: 0 5px;
}
}

Expand All @@ -71,8 +71,13 @@ html:not(.sidebar-visible) #menu-bar:not(:hover).folded > #menu-bar-sticky-conta
transform: translateY(-60px);
}

.left-buttons { margin: 0 5px; }
.no-js .left-buttons { display: none; }
.left-buttons {
display: flex;
margin: 0 5px;
}
.no-js .left-buttons {
display: none;
}

.menu-title {
display: inline-block;
Expand Down Expand Up @@ -374,6 +379,7 @@ a:hover {
.theme-popup {
position: absolute;
left: 10px;
top: 50px;
z-index: 1000;
border-radius: 4px;
font-size: 0.7em;
Expand Down

0 comments on commit 8ba1830

Please sign in to comment.