Skip to content

Commit

Permalink
Additional root body > div
Browse files Browse the repository at this point in the history
This is needed for one page applications like search.nixos.org
  • Loading branch information
garbas committed Jan 9, 2021
1 parent 7562bd1 commit 1b55ca2
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/banners.less
@@ -1,4 +1,4 @@
// Needs to be part of the *root* element, e.g. body > main > .wide-banner
// Needs to be part of the *root* element, e.g. body > main > .wide-banner, body > div > main
// `.-detailed` elements will be shown only for wider viewports (-lg)
.wide-banner {
&:first-child {
Expand Down
1 change: 1 addition & 0 deletions src/components/footer.less
@@ -1,5 +1,6 @@
// This file defines the navigation at the bottom of the page.

body > div > footer,
body > footer {
& > div {
#container();
Expand Down
2 changes: 2 additions & 0 deletions src/components/navbar.less
@@ -1,5 +1,6 @@
// This file defines the navigation bar at the top of the page.

body > div > header,
body > header {
@_height: #theme.navbar[height];
@_link_flavour_size: 4*@unit;
Expand Down Expand Up @@ -328,6 +329,7 @@ body > header {
// =============

& when (#theme.navbar[static] = true) {
body > div > header {
body > header {
position: static;
top: 0;
Expand Down
2 changes: 1 addition & 1 deletion src/components/pane.less
@@ -1,6 +1,6 @@
// This component assumes it is used in an unmanaged layout.
//
// Basically, at body > main > .fullscreen-pane
// Basically, at body > main > .fullscreen-pane, body > div > main > .fullscreen-pane
//
// This only defines the basic unopinionated structure of the pane.
// All panes should have their own "component" implementing it.
Expand Down
1 change: 1 addition & 0 deletions src/layout.less
Expand Up @@ -66,6 +66,7 @@ body {
});
}

body > div > main,
body > main {
flex-grow: 1;
}
Expand Down

0 comments on commit 1b55ca2

Please sign in to comment.