Skip to content
Merged

Css fix #1361

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

### Fixed
- Fix bug in parsing META files when there are no dependencies (@jonludlam, #1352)
- Fix #1335 - incorrect rendering when on medium screen size with no global
sidebar (@lukemaurer, #1361)

# 3.0.0

Expand Down
21 changes: 19 additions & 2 deletions src/html_support_files/odoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -864,11 +864,11 @@ td.def-doc *:first-child {
line-height: 1.2;
}

.odoc-toc.odoc-local-toc:before {
.odoc-toc.odoc-local-toc:has(~ .odoc-global-toc):before {
content: "Local content";

}
.odoc-toc.odoc-global-toc:before {
.odoc-toc.odoc-global-toc:has(~ .odoc-local-toc):before {
content: "Global content";
}

Expand Down Expand Up @@ -1304,6 +1304,13 @@ body.odoc:has( .odoc-search) .odoc-toc {
"sidebar preamble"
"sidebar content";
}
body.odoc:not(:has(> .odoc-tocs .odoc-global-toc)) {
grid-template-areas:
"search-bar nav"
"sidebar preamble"
"sidebar content";
grid-template-columns: min-content 1fr;
}
}

@media only screen and (max-width: 110ex) {
Expand Down Expand Up @@ -1331,6 +1338,16 @@ body.odoc:has( .odoc-search) .odoc-toc {
"toc-global";
grid-template-columns: 1fr;
}
body.odoc:not(:has(> .odoc-tocs .odoc-global-toc)) {
grid-template-areas:
"search-bar"
"nav"
"preamble"
"toc-local"
"content"
"toc-global";
grid-template-columns: 1fr;
}
body.odoc .odoc-search {
position: relative;
height: calc(var(--search-bar-height) + 2 * var(--search-padding-top));
Expand Down