-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flatten the rendered page structure? #1668
Comments
This change would give users a lot of flexibility with the page layout. |
I expect it will be difficult to do this in a backwards-compatible way, and it will probably cause a lot of churn with the CSS. I recommend we consider more incremental solutions. |
#1669 shows how much churn there is (not much, I would say). If we absolutely must keep the same nested page structure for backwards compatibility, then I think we'll have to revive something like #253. With the current code base, if you want to have a header that takes 100% of the width (with a sidebar that starts below it), you can technically do so by inserting it in head, but it's clearly wrong since it's supposed to fill in the <head>. |
Okay. I can take a look at #1669 when I have time but it’s not yet done and I see some hints of difficulties (do the container media queries still work? how does this affect custom styles in userland?). |
I am pretty sure the container media queries still work. I went through them yesterday and tested all the breakpoints. |
Since I haven’t had a chance to test yet, perhaps someone would be kind enough to explain how the container queries still work given that |
Ah! Those container queries. They will probably break. I will investigate and report back. |
I added the |
It disables margin collapse. |
The page structure currently is the following:
there are lots of optional and custom content, but the fact that some of it is nested in the center div makes it a bit difficult to reorganize with css (flexbox or grid).
It would feel nice to flatten the body:
I experimented a bit, and it doesn't seem to require many changes in grid.css — basically we just have to tack an .observablehq-center class on the header, main and footer elements, and change a few of the margins.
An alternative (or complement) would be to reboot #253 and allow "full page templates".
The text was updated successfully, but these errors were encountered: