<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>264676</bug_id>
          
          <creation_ts>2023-11-11 08:02:22 -0800</creation_ts>
          <short_desc>Add remaining &apos;legend&apos; UA stylesheet rules from HTML Web Specification</short_desc>
          <delta_ts>2025-03-01 01:41:39 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>CSS</component>
          <version>Safari Technology Preview</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>189304</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar, WPTImpact</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ahmad Saleem">ahmad.saleem792</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ntim</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1991852</commentid>
    <comment_count>0</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2023-11-11 08:02:22 -0800</bug_when>
    <thetext>Hi Team,

While looking into default UA stylesheet of &apos;ladybird&apos; 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&apos;t want to do them.

Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1991913</commentid>
    <comment_count>1</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2023-11-11 15:34:20 -0800</bug_when>
    <thetext>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:

&quot;It&apos;s complicated. You&apos;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.&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1993675</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-11-18 08:03:14 -0800</bug_when>
    <thetext>&lt;rdar://problem/118602283&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2099586</commentid>
    <comment_count>3</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2025-03-01 01:41:39 -0800</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 189304 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>