-
Notifications
You must be signed in to change notification settings - Fork 90
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
Fix gaps between preamble and content #1146
Conversation
Since the introduction of the grid system, margin collapse did not work between the preamble and content as they are not in the same element. It makes sense to have them in the same element, as they are to be displayed in a single flow. Signed-off-by: Paul-Elliot <[email protected]>
Signed-off-by: Paul-Elliot <[email protected]>
Nice, the CI needs some work (promoting test ?), but I like the PR. |
Signed-off-by: Paul-Elliot <[email protected]>
I don't think this should be done. Basically all the different page elements should be at the same level, you can then easily dispatch them using CSS grid. |
For example Here's a design I can no longer do:
Please don't break odoc's markup because your CSS is broken. |
I think this is a good reason not to go forward with this PR, thanks for the feedback. |
In general adding more I would rather suggest someone takes a deep look at rebooting and trimming down The thing you absolutely do not want is thousands of lines of CSS which is easy to get when people "fix" the CSS here and there (personally I don't think CSS and web design is really suitable for free software collaboration but that's another story – and the reason why I gave up trying to help with |
And btw. since I'm looking at odig's CSS this PR certainly does break
|
Thanks for your input. I would not author odoc's CSS either. I'm just trying to fix some problems without rewriting the whole thing, which may indeed be a bad idea. Until someone (with the skills to do it) rewrite the whole thing, I'll stick with that. On the topic of this PR: Yes, you are right, I underestimated the distinction between the preamble and the content. I can try to open a PR with a similar approach to what is done in odig? Or do you want to take care of that @EmileTrotignon ? |
@panglesd I have a patch ready, I will open a PR. |
Fix #1111 (alternative to #1143).
Since the introduction of the grid system (#999), margin collapse did not work between the preamble and content, creating gaps on which people fell:
This PR slightly changes the html layout, putting the
odoc-preamble
andodoc-content
in anodoc-main
element, which in my opinion make more sense than previously:Previously, they were separated by the nav bar. I wonder if this was a deliberate choice, eg for accessibility reasons, or if it just happened to be like that?
This does not affects ocaml.org (which uses the json output), and from my tests it does not seem to affect odig (let's ping its author, @dbuenzli, so he's aware of the potential layout change!).