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

Flex container doesn't display correctly next to a legend #29712

Closed
jeromelebleu opened this issue Nov 22, 2019 · 4 comments · Fixed by #30345
Closed

Flex container doesn't display correctly next to a legend #29712

jeromelebleu opened this issue Nov 22, 2019 · 4 comments · Fixed by #30345

Comments

@jeromelebleu
Copy link
Contributor

jeromelebleu commented Nov 22, 2019

Since #28917, the legend element is no longer rendered with display: block but it has float: left instead. There is at least an issue when displaying a grid just next to legend as it is rendered at the right and not under (see: https://jsfiddle.net/du95trv3/2/). I let you see what is the best way to fix that, normalize.css for example defines display: table for legend...

@jeromelebleu jeromelebleu changed the title Grid is broken next to a legend [v5] Grid is broken next to a legend Nov 26, 2019
@ysds
Copy link
Member

ysds commented Nov 27, 2019

@jeromelebleu Thanks for your report.

More reduced test case: https://codepen.io/fellows3/pen/GRRVoVd

@jeromelebleu jeromelebleu changed the title [v5] Grid is broken next to a legend Flex container doesn't display correctly next to a legend Nov 27, 2019
@MartijnCuppens
Copy link
Member

I let you see what is the best way to fix that, normalize.css for example defines display: table for legend...

The float is added so that a border of the fieldset (if added) wraps around the legend.

@jeromelebleu
Copy link
Contributor Author

Thanks @MartijnCuppens for the explanation. As there is no border by default and to prevent side effect, could it be a solution to remove the float and let it up to the developer to add it as needed? Just my two cents...

@MartijnCuppens
Copy link
Member

MartijnCuppens commented Mar 6, 2020

I've added this to the v5 board. This should be fixed, or the changes in v5 should be reverted (making it harder to theme <legend>s). We can start from #29831, but got to find a way to fix it in Edge

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

Successfully merging a pull request may close this issue.

3 participants