Bug 264676 - Add remaining 'legend' UA stylesheet rules from HTML Web Specification
Summary: Add remaining 'legend' UA stylesheet rules from HTML Web Specification
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar, WPTImpact
Depends on:
Blocks:
 
Reported: 2023-11-11 08:02 PST by Ahmad Saleem
Modified: 2023-11-18 08:03 PST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ahmad Saleem 2023-11-11 08:02:22 PST
Hi Team,

While looking into default UA stylesheet of 'ladybird' browser, I noticed that they are following all UA stylesheet rules and noticed, we have added following:

____

legend[align=left i] {
  justify-self: left;
}

legend[align=center i] {
  justify-self: center;
}

legend[align=right i] {
  justify-self: right;
}

____

Web-Spec: https://html.spec.whatwg.org/#the-fieldset-and-legend-elements

In my local testing, adding them leads to progress following test case: http://wpt.live/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-align-justify-self.html

I think we should go for it and get all those WPT wins unless if there is genuine reason that we don't want to do them.

Thanks!
Comment 1 Ahmad Saleem 2023-11-11 15:34:20 PST
Please refer to PR attempt, which is not correct way to approach this bug as highlighted by Tim.

https://github.com/WebKit/WebKit/pull/20370

Just to note for future purposes:

"It's complicated. You'd need to implement support for justify-self for children of blocks and remove the old code that maps align to text-align, and then sync the UA styles as you did here."
Comment 2 Radar WebKit Bug Importer 2023-11-18 08:03:14 PST
<rdar://problem/118602283>