From 99019b74aa07944fcf63fb8051961b2ee7f9e410 Mon Sep 17 00:00:00 2001 From: Matt Ickstadt Date: Mon, 30 Jul 2018 19:03:29 -0500 Subject: [PATCH 1/2] Remove hit-test dead space between buttons --- src/theme/css/chrome.css | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/theme/css/chrome.css b/src/theme/css/chrome.css index 911cdc8a41..82883e6b9a 100644 --- a/src/theme/css/chrome.css +++ b/src/theme/css/chrome.css @@ -41,7 +41,7 @@ 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; @@ -49,7 +49,7 @@ a > .hljs { } @media only screen and (max-width: 420px) { #menu-bar i, #menu-bar .icon-button { - margin: 0 5px; + padding: 0 5px; } } @@ -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; @@ -374,6 +379,7 @@ a:hover { .theme-popup { position: absolute; left: 10px; + top: 50px; z-index: 1000; border-radius: 4px; font-size: 0.7em; From 512826c4658dda19b6487f5400d02d3379331737 Mon Sep 17 00:00:00 2001 From: Matt Ickstadt Date: Mon, 30 Jul 2018 19:06:50 -0500 Subject: [PATCH 2/2] Fix hiding theme menu --- src/theme/book.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/theme/book.js b/src/theme/book.js index aea7eda74b..c0cd58e443 100644 --- a/src/theme/book.js +++ b/src/theme/book.js @@ -380,7 +380,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(); } });