Skip to content
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

sections do not expand to cover margin-bottom on children #5390

Open
lyubomir-popov opened this issue Oct 21, 2024 · 2 comments
Open

sections do not expand to cover margin-bottom on children #5390

lyubomir-popov opened this issue Oct 21, 2024 · 2 comments

Comments

@lyubomir-popov
Copy link
Contributor

On sections (and probably other elements?) margin-bottom of children is clipped.
The old trick of overflow-y:auto fixes it:

To replicate, place a paragraph in a section and compare:

without the fix:
image

with the fix:
image

Copy link

Thank you for reporting us your feedback!

The internal ticket has been created: https://warthogs.atlassian.net/browse/WD-16066.

This message was autogenerated

@bartaz bartaz changed the title sections dop not expand to cover margin-bottom on children sections do not expand to cover margin-bottom on children Oct 21, 2024
@bartaz
Copy link
Member

bartaz commented Oct 21, 2024

I'm not sure if we should apply such changes to base HTML elements.

Margin bottom is not clipped. Yes, by the browser terms it overflows from the section itself, but is applied. section is a purely block element without any explicit styles, doesn't have any margin itself, so applying overflow: auto doesn't seem to have any visual effect on margin collapse.

If we do that for section should we do it for div as well? what others?

If there are specific places where baseline drifts they are likely not caused by browser native styling of elements, but errors in our components. So we should track those instead I believe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants