Skip to content

Commit

Permalink
Introduce a --menu-bar-height CSS variable
Browse files Browse the repository at this point in the history
  • Loading branch information
mattheww committed Oct 26, 2019
1 parent 99ced51 commit 589ca12
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/theme/css/chrome.css
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ a > .hljs {
position: relative;
padding: 0 8px;
z-index: 10;
line-height: 50px;
line-height: var(--menu-bar-height);
cursor: pointer;
transition: color 0.5s;
}
Expand Down Expand Up @@ -73,7 +73,7 @@ a > .hljs {
}

html:not(.sidebar-visible) #menu-bar:not(:hover).folded > #menu-bar-sticky-container {
transform: translateY(-60px);
transform: translateY(calc(-10px - var(--menu-bar-height)));
}

.left-buttons {
Expand All @@ -88,7 +88,7 @@ html:not(.sidebar-visible) #menu-bar:not(:hover).folded > #menu-bar-sticky-conta
display: inline-block;
font-weight: 200;
font-size: 20px;
line-height: 50px;
line-height: var(--menu-bar-height);
text-align: center;
margin: 0;
flex: 1;
Expand Down Expand Up @@ -446,7 +446,7 @@ ul#searchresults span.teaser em {
.theme-popup {
position: absolute;
left: 10px;
top: 50px;
top: var(--menu-bar-height);
z-index: 1000;
border-radius: 4px;
font-size: 0.7em;
Expand Down
2 changes: 1 addition & 1 deletion src/theme/css/general.css
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ h1 a.header:target,
h2 a.header:target,
h3 a.header:target,
h4 a.header:target {
scroll-margin-top: 62px;
scroll-margin-top: calc(var(--menu-bar-height) + 0.5em);
}

.page {
Expand Down
1 change: 1 addition & 0 deletions src/theme/css/variables.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
--sidebar-width: 300px;
--page-padding: 15px;
--content-max-width: 750px;
--menu-bar-height: 50px;
}

/* Themes */
Expand Down

0 comments on commit 589ca12

Please sign in to comment.