<?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>140543</bug_id>
          
          <creation_ts>2015-01-16 03:51:36 -0800</creation_ts>
          <short_desc>::first-line doesn&apos;t skip flex/grid elements</short_desc>
          <delta_ts>2022-11-02 06:11:18 -0700</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>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=139256</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>140541</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Manuel Rego Casasnovas">rego</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>bfulgham</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>zalan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1061804</commentid>
    <comment_count>0</comment_count>
      <attachid>244760</attachid>
    <who name="Manuel Rego Casasnovas">rego</who>
    <bug_when>2015-01-16 03:51:36 -0800</bug_when>
    <thetext>Created attachment 244760
Example to reproduce the issue

First bug #140541 should be fixed, but this issue was present before and it&apos;s still present in Blink (https://code.google.com/p/chromium/issues/detail?id=449481).

Example (attached) to reproduce the issue (&quot;Green&quot; should be green and &quot;Black&quot; should be black):

&lt;style&gt;
    .first-line-green::first-line {
        color: lime;
    }

    .flex {
        display: flex;
    }
&lt;/style&gt;
&lt;div class=&quot;first-line-green&quot;&gt;
    &lt;div class=&quot;flex&quot;&gt;
        Black
    &lt;/div&gt;
    Green
&lt;/div&gt;

The flex is ignored as expected, however it doesn&apos;t go to the next element (like in the case of floated/positioned elements).

BTW, the same happens for grids.

From the spec (http://www.w3.org/TR/css-flexbox-1/#flex-containers):
&quot;the ::first-line and ::first-letter pseudo-elements do not apply to flex containers, and flex containers do not contribute a first formatted line or first letter to their ancestors.&quot;

Also a mail from CSS WG mailing list confirming the expected behavior:
http://lists.w3.org/Archives/Public/www-style/2014Dec/0305.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1908027</commentid>
    <comment_count>1</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-10-25 01:38:51 -0700</bug_when>
    <thetext>As of right now, all browsers (Safari 16.1, Chrome Canary 109 and Firefox Nightly 108) and does not have any lime color for first line and they are matching each other.

But I think if it is an issue, we should keep it open and also put it on Radar. I will leave for others to comment. Thanks!</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>244760</attachid>
            <date>2015-01-16 03:51:36 -0800</date>
            <delta_ts>2015-01-16 03:51:36 -0800</delta_ts>
            <desc>Example to reproduce the issue</desc>
            <filename>first-line-flex.html</filename>
            <type>text/html</type>
            <size>218</size>
            <attacher name="Manuel Rego Casasnovas">rego</attacher>
            
              <data encoding="base64">PHN0eWxlPgogICAgLmZpcnN0LWxpbmUtZ3JlZW46OmZpcnN0LWxpbmUgewogICAgICAgIGNvbG9y
OiBsaW1lOwogICAgfQoKICAgIC5mbGV4IHsKICAgICAgICBkaXNwbGF5OiBmbGV4OwogICAgfQo8
L3N0eWxlPgo8ZGl2IGNsYXNzPSJmaXJzdC1saW5lLWdyZWVuIj4KICAgIDxkaXYgY2xhc3M9ImZs
ZXgiPgogICAgICAgIEJsYWNrCiAgICA8L2Rpdj4KICAgIEdyZWVuCjwvZGl2Pgo=
</data>

          </attachment>
      

    </bug>

</bugzilla>