Skip to content

Commit

Permalink
Merge pull request #2841 from henrikt-ma/cleanup/link-target-displace…
Browse files Browse the repository at this point in the history
…ment

Avoid current HTML jump target being hidden behind page header
  • Loading branch information
HansOlsson committed Feb 19, 2021
2 parents 98f567a + fd2f0ba commit c668500
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
18 changes: 16 additions & 2 deletions css/MLS-navbar-left.css
Expand Up @@ -147,13 +147,27 @@ nav > div.ltx_TOC {
padding-right: calc(1.5rem + 2 * 0.5rem + 8px);
background: #F6F6F6; /* Same as body. */
color: black; /* Same as side bar. */
border-bottom-color: #DE1D31; /* "Bouncing ball red" */
border-bottom-width: 2px;
white-space: nowrap;
text-overflow: ellipsis;
}

/* Make current jump target appear below the page header instead of behind it.
*/
:target:before {
visibility: hidden;
content: "X"; /* Hidden, but needs to be non-empty to work in Chrome. */
display: block;
position: relative;
top: calc(-(2.5rem + 2px)); /* Offset by total height of .ltx_page_header. */
}

.ltx_page_content {
padding: 1rem;
margin-top: 1.5rem; /* Header height plus padding below, minus a little bit. */
padding-top: 2rem;
padding-bottom: 1rem;
padding-left: 1rem;
padding-right: 1rem;
background: white;
}

Expand Down
5 changes: 2 additions & 3 deletions css/MLS.css
Expand Up @@ -15,9 +15,8 @@ body {
a { text-decoration: none; color: inherit; }
a:hover { text-decoration: underline; }

.ltx_page_header {
border-bottom-color: #DE1D31; /* "Bouncing ball red" */
border-bottom-width: 2px;
.ltx_titlepage {
padding-top: 2rem; /* The big Modelica Language logo doesn't look good too close to page header. */
}

.ltx_tocentry_subsection { display: none; }
Expand Down

0 comments on commit c668500

Please sign in to comment.