[Webkit-unassigned] [Bug 275341] New: CSS :host can't set nesting (Safari 17.5)

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jun 10 19:52:54 PDT 2024


https://bugs.webkit.org/show_bug.cgi?id=275341

            Bug ID: 275341
           Summary: CSS :host can't set nesting (Safari 17.5)
           Product: WebKit
           Version: Safari 17
          Hardware: Mac (Apple Silicon)
                OS: macOS 14
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: CSS
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: meistudioli at gmail.com
                CC: koivisto at iki.fi

Created attachment 471642

  --> https://bugs.webkit.org/attachment.cgi?id=471642&action=review

CSS sample code. (same as issue description)

Safari Version       : 17.5
OS                   : macOS 14.5


※ Steps to reproduce the problem
1. shadowDOM set style.
2. set the following CSS and find out custom property in Nesting doesn't work.

<style>
:host {
  --block-size: auto;
}

:host(.align-container-size) {
  block-size: 100%;

  .main {
    --block-size: 100%;
  }
}

.main {
  inline-size: 100%;

  /* safari will get "auto" */
  block-size: var(--block-size); 
}
</style>


※ What is the expected behavior?
CSS custom property > --block-size should be "100%" once :host(.align-container-size) happened.

※ What went wrong?
CSS custom property > --block-size get "auto".

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20240611/1bf117e1/attachment.htm>


More information about the webkit-unassigned mailing list