-
Notifications
You must be signed in to change notification settings - Fork 310
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
Figure inside .column-screen steals that class #10899
Comments
I should note that if you remove the offending image in |
Thanks, I can repro. You can work around in the meantime by moving the offending image to its own I believe the issue arises from our expectation that |
That makes sense! I've reached for it in the past to build things like website hero sections, so if it's possible for it to work with more complex layouts, that would be fantastic (but I understand that you hadn't intended it for that kind of use). Absolute worst case for us over on Closeread, we could potentially write our own CSS to re-implement the |
Mmmm, I wondered whether the caption positioning betrayed some intentionality there. This is good to know! We probably need to try out a variety of figure possibilities to think holistically about how they should be laid out, but I might also try manually assigning the grid styles to our For us, the problem isn't so much that the figure image gets it but more that (a) the section as a whole loses it and (b) |
It's easier to have a discussion if we can see a concrete example of what happens in closeread when this goes bad. Can you share one? |
@cscheid Absolutely! https://github.com/qmd-lab/closeread/blob/bugfix/81/docs/gallery/demos/sticky-blocks/index.qmd Here it is as in the PR currently: Screen.Recording.2024-09-28.at.17.24.57.movAnd here it is again with the offending content removed: Screen.Recording.2024-09-28.at.17.27.16.mov |
Ok, thanks. This is my understanding of how we end up in a bad state:
Is that correct? My original idea to fix Quarto's |
I think it would likely break it, to be honest. The basic idea of Closeread is to take the children of It sounds like we might be better off manually styling |
I think that's accurate. If nothing else, because I think I will eventually need to fix the bug you found, and that will break closeread even more! In that vein, can you let me know when you made the change so I can wait and not break your extension? Thank you! |
No worries — I would anticipate that to be over the next couple of weeks 😊 |
Bug description
When we place an image with a caption inside a fenced div with
.column-screen
, the image gets.column-screen
and the section does not, which causes various kinds of layout havoc (the rest of the section doesn't get the enlarged width, and.page-columns
propagates up from the image through the rest of the document, which makes placing one's own CSS grids inside the section extremely difficult).Steps to reproduce
Test case: https://github.com/jimjam-slam/test-quarto-cr-img-classes
Expected behavior
The fenced div in the input document that has
.column-screen
should have it in the output HTML, and the image inside#notworking
should not. The other ancestors of the image should also not have.page-fill .page-columns
.Actual behavior
The image receives
.column-screen
and goes to full width. Other elements in the section don't. Any nested grids declared inside the broken section tend to get overridden, as.page-columns
is on all ancestors of the image inside.Your environment
Quarto check output
Check file:///Users/rensa/code/quarto-cli/src/quarto.ts Quarto 99.9.9 [✓] Checking versions of quarto binary dependencies... Pandoc version 3.4.0: OK Dart Sass version 1.70.0: OK Deno version 1.41.0: OK Typst version 0.11.0: OK [✓] Checking versions of quarto dependencies......OK [✓] Checking Quarto installation......OK Version: 99.9.9 commit: 2d0331c755c74544539cec2706df4bc4d378694d Path: /Users/rensa/code/quarto-cli/package/dist/bin [✓] Checking tools....................OK TinyTeX: (external install) Chromium: (not installed) [✓] Checking LaTeX....................OK Using: TinyTex Path: /Users/rensa/Library/TinyTeX/bin/universal-darwin Version: 2021 [✓] Checking basic markdown render....OK [✓] Checking Python 3 installation....OK Version: 3.9.7 (Conda) Path: /Users/rensa/miniforge3/bin/python Jupyter: (None) Jupyter is not available in this Python installation. Install with conda install jupyter [✓] Checking R installation...........OK Version: 4.2.1 Path: /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources LibPaths: - /Users/rensa/Library/R/arm64/4.2/library - /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library knitr: 1.42 rmarkdown: 2.21 [✓] Checking Knitr engine render......OK
EDIT: added a screenshot of the output, and also a link to previous discussion:
The text was updated successfully, but these errors were encountered: