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

LibWeb: Layout the fieldset's rendered legend #2546

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kostyafarber
Copy link
Contributor

@kostyafarber kostyafarber commented Nov 24, 2024

This fixes the legend position on my website :^) https://kostyafarber.com/about

with change:
image

without change:
image

@kostyafarber kostyafarber force-pushed the layout-and-paint-legend-and-fieldset branch from 822d9fd to c51aba1 Compare November 24, 2024 12:57
@kostyafarber
Copy link
Contributor Author

Thanks for catching that out, I’ll have a look at those regressions then and see what’s going on.

I’ll import the fixed test.

@kostyafarber kostyafarber force-pushed the layout-and-paint-legend-and-fieldset branch 2 times, most recently from b190b04 to 9306428 Compare November 25, 2024 13:57
@kostyafarber
Copy link
Contributor Author

kostyafarber commented Nov 25, 2024

@tcl3 Update on the WPT tests. I've imported the passing test and I've worked through the first three.

  • One and two were related to not setting and using shrink-fit correctly.
  • Three is because now that fieldset establishes a BFC we need to create an anonymous wrapper box for it's content (as per the spec).

However the last two are how the newly positioned legend element interacts with the fieldset elements overflow when this property is set to hidden (i.e overflow: hidden;).

Please see images for the http://wpt.live/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-transform-translatez.html test below:

This branch:
image

Master:
image

Chrome:
image

It looks like we were initially passing because we just didn't position the legend correctly at all. However, I can't find anywhere in the spec on fieldset and legend that specifies how it should interact with overflow.

It would be good if somebody could suggest what we do in this case?

@nico
Copy link
Contributor

nico commented Nov 25, 2024

(commit message: "Layout" is a noun, "Lay out" is the verb.)

@kostyafarber
Copy link
Contributor Author

(commit message: "Layout" is a noun, "Lay out" is the verb.)

That it is, I will update.

@kostyafarber kostyafarber force-pushed the layout-and-paint-legend-and-fieldset branch from 9306428 to a078a48 Compare November 25, 2024 14:31
@kostyafarber
Copy link
Contributor Author

I've asked the discord but haven't got a response. I am wary to start implementing any feature (removing the legend from the clipped area) that isn't covered by the spec, as I've been told in the past that we should match reality and not just try pass wpt tests :^).

What is the ways forward here?

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

Successfully merging this pull request may close these issues.

3 participants