aboutsummaryrefslogtreecommitdiffhomepage
path: root/css/chrome.css
diff options
context:
space:
mode:
authorjohannst <johannst@users.noreply.github.com>2022-08-23 19:48:10 +0000
committerjohannst <johannst@users.noreply.github.com>2022-08-23 19:48:10 +0000
commit25b609d0c70d49dd62479ce03578704e62712bd8 (patch)
treef9c761f5c72ded4cf9c31bad9f15109cf810b55c /css/chrome.css
parentf647a8c45dda58078c86a96c68ae00ea1c69a222 (diff)
downloadnotes-25b609d0c70d49dd62479ce03578704e62712bd8.tar.gz
notes-25b609d0c70d49dd62479ce03578704e62712bd8.zip
deploy: 6f6fef7bb61712038220a7607447d38689ad6978
Diffstat (limited to 'css/chrome.css')
-rw-r--r--css/chrome.css86
1 files changed, 68 insertions, 18 deletions
diff --git a/css/chrome.css b/css/chrome.css
index 3ff5992..10fa4b3 100644
--- a/css/chrome.css
+++ b/css/chrome.css
@@ -20,14 +20,13 @@ a > .hljs {
/* Menu Bar */
-#menu-bar {
- position: -webkit-sticky;
- position: sticky;
- top: 0;
+#menu-bar,
+#menu-bar-hover-placeholder {
z-index: 101;
margin: auto calc(0px - var(--page-padding));
}
-#menu-bar > #menu-bar-sticky-container {
+#menu-bar {
+ position: relative;
display: flex;
flex-wrap: wrap;
background-color: var(--bg);
@@ -35,10 +34,21 @@ a > .hljs {
border-bottom-width: 1px;
border-bottom-style: solid;
}
-.js #menu-bar > #menu-bar-sticky-container {
- transition: transform 0.3s;
+#menu-bar.sticky,
+.js #menu-bar-hover-placeholder:hover + #menu-bar,
+.js #menu-bar:hover,
+.js.sidebar-visible #menu-bar {
+ position: -webkit-sticky;
+ position: sticky;
+ top: 0 !important;
}
-#menu-bar.bordered > #menu-bar-sticky-container {
+#menu-bar-hover-placeholder {
+ position: sticky;
+ position: -webkit-sticky;
+ top: 0;
+ height: var(--menu-bar-height);
+}
+#menu-bar.bordered {
border-bottom-color: var(--table-border-color);
}
#menu-bar i, #menu-bar .icon-button {
@@ -72,10 +82,6 @@ a > .hljs {
text-decoration: none;
}
-html:not(.sidebar-visible) #menu-bar:not(:hover).folded > #menu-bar-sticky-container {
- transform: translateY(calc(-10px - var(--menu-bar-height)));
-}
-
.left-buttons {
display: flex;
margin: 0 5px;
@@ -87,7 +93,7 @@ html:not(.sidebar-visible) #menu-bar:not(:hover).folded > #menu-bar-sticky-conta
.menu-title {
display: inline-block;
font-weight: 200;
- font-size: 2rem;
+ font-size: 2.4rem;
line-height: var(--menu-bar-height);
text-align: center;
margin: 0;
@@ -202,24 +208,63 @@ pre {
pre > .buttons {
position: absolute;
z-index: 100;
- right: 5px;
- top: 5px;
+ right: 0px;
+ top: 2px;
+ margin: 0px;
+ padding: 2px 0px;
color: var(--sidebar-fg);
cursor: pointer;
+ visibility: hidden;
+ opacity: 0;
+ transition: visibility 0.1s linear, opacity 0.1s linear;
+}
+pre:hover > .buttons {
+ visibility: visible;
+ opacity: 1
}
pre > .buttons :hover {
color: var(--sidebar-active);
+ border-color: var(--icons-hover);
+ background-color: var(--theme-hover);
}
pre > .buttons i {
margin-left: 8px;
}
pre > .buttons button {
- color: inherit;
- background: transparent;
- border: none;
cursor: inherit;
+ margin: 0px 5px;
+ padding: 3px 5px;
+ font-size: 14px;
+
+ border-style: solid;
+ border-width: 1px;
+ border-radius: 4px;
+ border-color: var(--icons);
+ background-color: var(--theme-popup-bg);
+ transition: 100ms;
+ transition-property: color,border-color,background-color;
+ color: var(--icons);
+}
+@media (pointer: coarse) {
+ pre > .buttons button {
+ /* On mobile, make it easier to tap buttons. */
+ padding: 0.3rem 1rem;
+ }
+}
+pre > code {
+ padding: 1rem;
+}
+
+/* FIXME: ACE editors overlap their buttons because ACE does absolute
+ positioning within the code block which breaks padding. The only solution I
+ can think of is to move the padding to the outer pre tag (or insert a div
+ wrapper), but that would require fixing a whole bunch of CSS rules.
+*/
+.hljs.ace_editor {
+ padding: 0rem 0rem;
}
+
pre > .result {
margin-top: 10px;
}
@@ -417,6 +462,11 @@ ul#searchresults span.teaser em {
display: none;
}
+.chapter li.chapter-item {
+ line-height: 1.5em;
+ margin-top: 0.6em;
+}
+
.chapter li.expanded > a.toggle div {
transform: rotate(90deg);
}