[Webkit-unassigned] [Bug 241566] New: CSS `::marker` does not support defining CSS properties ::marker

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jun 13 13:36:22 PDT 2022


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

            Bug ID: 241566
           Summary: CSS `::marker` does not support defining CSS
                    properties ::marker
           Product: WebKit
           Version: Safari 15
          Hardware: Mac (Apple Silicon)
                OS: macOS 12
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: CSS
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: jordan at cryptica.me

Created attachment 460211

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

A file showcasing the issue

In Gecko- and Blink-based browsers you can define CSS variables on the `::marker` pseudo-element. However, in Safari, these property declarations are thrown out. This is a problem even in the latest Safari Tech Preview.

For instance, the following works:

```
.works {
  --alpha: 0.75;
}

.works ::marker {
  color: rgb(255 119 0 / var(--alpha));
}
```

However, if you define `--alpha` on the ::marker itself any values using it act as if it was not defined at all even though none of them show as invalid in dev tools:
```
.does-not-work ::marker {
  --alpha: 0.75;
  color: rgb(255 119 0 / var(--alpha));
}
```

In this situation, if a parent element defined `--alpha` then the marker would suddenly get a color again but it would have the wrong alpha channel value (the one defined in the parent and not in `::marker`)

I think the CSS spec is possibly underspecified here as it does limit what properties apply to `::marker` pseudo elements but I believe the omission of CSS variables is likely a mistake as variables work in values as long as they're defined in the cascade.

Working Draft: https://www.w3.org/TR/css-lists-3/#marker-properties
Editors Draft: https://drafts.csswg.org/css-lists-3/#marker-properties (this appears to be having issues today — 2022-06-13)

I'd love to send in a patch but I'm a bit too unfamiliar with the WebKit codebase and development process. From a first glance I'd say that https://github.com/WebKit/WebKit/blob/c62798d34562dcd0b8fdc676808ef73b74b5e262/Source/WebCore/style/PropertyCascade.cpp#L212 is probably the appropriate place to start looking?

-- 
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/20220613/731c2a47/attachment-0001.htm>


More information about the webkit-unassigned mailing list