<?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>273996</bug_id>
          
          <creation_ts>2024-05-10 02:57:10 -0700</creation_ts>
          <short_desc>Relative Color Syntax doesn&apos;t work with `light-dark()` CSS function</short_desc>
          <delta_ts>2024-08-06 09:07:10 -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>Safari Technology Preview</version>
          <rep_platform>Mac (Apple Silicon)</rep_platform>
          <op_sys>macOS 14</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=266889</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=262914</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=245970</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Roman Czerkies">dev</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>akeerthi</cc>
    
    <cc>dev</cc>
    
    <cc>heycam</cc>
    
    <cc>m_dubet</cc>
    
    <cc>ntim</cc>
    
    <cc>sam</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2034504</commentid>
    <comment_count>0</comment_count>
      <attachid>471355</attachid>
    <who name="Roman Czerkies">dev</who>
    <bug_when>2024-05-10 02:57:10 -0700</bug_when>
    <thetext>Created attachment 471355
Bug reproduction with and without `light-dark()` CSS function

When Custom Properties is assigned from the `light-dark()` CSS function, the CSS Relative Color Syntax doesn&apos;t work.

``` css
:root {
    --background-color-light-dark: light-dark(oklch(65.74% 0.2 34.41), oklch(35.74% 0.2 34.41));
}

p {
    background-color: oklch(from var(--background-color-light-dark) l c h / .5); /* doesn&apos;t work */
}
```

Bug reproduced with and without `light-dark()` CSS function in the attachment.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2035975</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2024-05-17 02:58:21 -0700</bug_when>
    <thetext>&lt;rdar://problem/128260951&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2050921</commentid>
    <comment_count>2</comment_count>
    <who name="Roman Czerkies">dev</who>
    <bug_when>2024-08-06 09:07:10 -0700</bug_when>
    <thetext>Fixed in this issue: https://bugs.webkit.org/show_bug.cgi?id=245970#c6</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>471355</attachid>
            <date>2024-05-10 02:57:10 -0700</date>
            <delta_ts>2024-05-10 02:57:10 -0700</delta_ts>
            <desc>Bug reproduction with and without `light-dark()` CSS function</desc>
            <filename>css-colors-5.html</filename>
            <type>text/html</type>
            <size>1704</size>
            <attacher name="Roman Czerkies">dev</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxodG1sIGxhbmc9ImZyIiBkaXI9ImF1dG8iPgogICAgPGhlYWQ+CiAg
ICAgICAgPG1ldGEgY2hhcnNldD0idXRmLTgiPgogICAgICAgIDxtZXRhIG5hbWU9InZpZXdwb3J0
IiBjb250ZW50PSJ3aWR0aD1kZXZpY2Utd2lkdGgsIGluaXRpYWwtc2NhbGU9MSwgdmlld3BvcnQt
Zml0PWNvdmVyIj4KICAgICAgICA8bWV0YSBuYW1lPSJjb2xvci1zY2hlbWUiIGNvbnRlbnQ9Imxp
Z2h0IGRhcmsiPgogICAgICAgIDxtZXRhIG5hbWU9InRoZW1lLWNvbG9yIiBtZWRpYT0iKHByZWZl
cnMtY29sb3Itc2NoZW1lOiBsaWdodCkiIGNvbnRlbnQ9ImhzbCgyMDAgMTAlIDk5JSkiPgogICAg
ICAgIDxtZXRhIG5hbWU9InRoZW1lLWNvbG9yIiBtZWRpYT0iKHByZWZlcnMtY29sb3Itc2NoZW1l
OiBkYXJrKSIgY29udGVudD0iaHNsKDAgMCUgMCUpIj4KICAgICAgICA8dGl0bGU+Q1NTIENvbG9y
cyA1PC90aXRsZT4KICAgICAgICA8c3R5bGU+CiAgICAgICAgICAgIDpyb290IHsKICAgICAgICAg
ICAgICAgIC0tYmFja2dyb3VuZC1jb2xvcjogb2tsY2goNjUuNzQlIDAuMiAzNC40MSk7CiAgICAg
ICAgICAgICAgICAtLWJhY2tncm91bmQtY29sb3ItbGlnaHQtZGFyazogbGlnaHQtZGFyayhva2xj
aCg2NS43NCUgMC4yIDM0LjQxKSwgb2tsY2goMzUuNzQlIDAuMiAzNC40MSkpOyAKICAgICAgICAg
ICAgfQogICAgICAgICAgICBzZWN0aW9uIHsKICAgICAgICAgICAgICAgIHAgewogICAgICAgICAg
ICAgICAgICAgIHBhZGRpbmc6IDFyZW07CiAgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZC1j
b2xvcjogb2tsY2goZnJvbSB2YXIoLS1iYWNrZ3JvdW5kLWNvbG9yLWxpZ2h0LWRhcmspIGwgYyBo
IC8gLjUpOwogICAgICAgICAgICAgICAgICAgIHNwYW4gewogICAgICAgICAgICAgICAgICAgICAg
ICBmb250LWZhbWlseTogbW9ub3NwYWNlOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAg
ICAgICAgICAgICAmOmZpcnN0LWNoaWxkIHsKICAgICAgICAgICAgICAgICAgICAgICAgYmFja2dy
b3VuZC1jb2xvcjogb2tsY2goZnJvbSB2YXIoLS1iYWNrZ3JvdW5kLWNvbG9yKSBsIGMgaCAvIC41
KTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0K
ICAgICAgICA8L3N0eWxlPgogICAgPC9oZWFkPgogICAgPGJvZHk+CiAgICAgICAgPG1haW4+CiAg
ICAgICAgICAgIDxzZWN0aW9uPgogICAgICAgICAgICAgICAgPHA+PHNwYW4+YGJhY2tncm91bmQt
Y29sb3I6IG9rbGNoKGZyb20gdmFyKC0tYmFja2dyb3VuZC1jb2xvcikgbCBjIGggLyAuNSlgPC9z
cGFuPiB3b3JrcyB3aGVuIEN1c3RvbSBQcm9wZXJ0eSBpcyBhc3NpZ25lZCB3aXRoIDxzcGFuPmBv
a2xjaCgpYDwvc3Bhbj4gQ1NTIGNvbG9yIGZ1bmN0aW9uPC9wPgogICAgICAgICAgICAgICAgPHA+
PHNwYW4+YGJhY2tncm91bmQtY29sb3I6IG9rbGNoKGZyb20gdmFyKC0tYmFja2dyb3VuZC1jb2xv
ci1saWdodC1kYXJrKSBsIGMgaCAvIC41KWA8L3NwYW4+IG5vdCBhcHBsaWVkIG9uIFNhZmFyaSBh
bmQgY3Jhc2ggb24gQ2hyb21lIHdoZW4gdGhlIEN1c3RvbSBQcm9wZXJ0eSBpcyBhc3NpZ25lZCB3
aXRoIDxzcGFuPmBsaWdodC1kYXJrKClgPC9zcGFuPiBDU1MgZnVuY3Rpb24uPC9wPgogICAgICAg
ICAgICA8L3NlY3Rpb24+CiAgICAgICAgPC9tYWluPgogICAgPC9ib2R5Pgo8L2h0bWw+
</data>

          </attachment>
      

    </bug>

</bugzilla>