-
Notifications
You must be signed in to change notification settings - Fork 22.8k
[CSS] docs: Correct display value and BFC behavior for button elements #40525
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
base: main
Are you sure you want to change the base?
Conversation
files/en-us/web/css/css_display/block_formatting_context/index.md
Outdated
Show resolved
Hide resolved
Preview URLs (comment last updated: 2025-07-24 14:26:00) |
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @kannanwisen, and thanks for trying to clean up this rather confusing prose. I thought the first line you modified was trying to say that some buttons and inputs default to display: flow-root
, but I've done some testing, and that looks to be incorrect. They all default to display: inline-block
as far as I can tell.
I agree that the second line that you've outright removed can be removed — it is badly written and confusing.
However, I think there is still work to do earlier on — I'd argue that the first line you've modified could just be removed as well. Earlier on in the bulleted list, there is a line that says "Inline-blocks (elements with {{cssxref("display", "display: inline-block")}}).", which covers the inline-block
case.
If you want to keep your explanatory text about buttons and inputs defaulting to inline-block
, I'd suggest adding it to the line I've cited instead, so the reader has some examples. You could then remove the line you edited to reduce repetition.
Kindly wait, both the pull the request I will update soon. |
Thank you for reviewing my contribution. I believe there might be a misunderstanding—I don’t recall intentionally stating that some buttons and inputs default to display: flow-root. If possible, could you kindly highlight where in my changes or comment this was implied? I’d like to review and clarify that part properly. Currently, I only see this part of our conversation, but I’ll make sure to respond to the rest of the feedback as soon as it becomes available. Thanks again for your time and support! |
@kannanwisen, sorry for the misunderstanding. I'm not saying your changes or comments imply that. I'm saying that some of the text, as it was originally, before you edited it, implied that. |
Description
This pull request corrects the documentation regarding the default display value and Block Formatting Context (BFC) behavior for and button types.
The current text contains two related statements that incorrectly assert that these elements default to display: flow-root. This PR removes both and replaces them with a single, accurate explanation.
Summary of Inaccuracies:
Motivation
This change provides a more accurate and nuanced explanation for developers.
Additional details
Suggested Change:
REMOVE the following two statements:
and
REPLACE them with this single, correct paragraph:
Related issues and pull requests