Bug 261806

Summary: iOS 17 > inline SVG can't apply CSS filter property effect
Product: WebKit Reporter: Paul Li <meistudioli>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: ahmad.saleem792, graouts, ian, karlcow, sabouhallawa, webkit-bug-importer
Priority: P2 Keywords: BrowserCompat, InRadar
Version: Safari 17   
Hardware: iPhone / iPad   
OS: Other   
See Also: https://bugs.webkit.org/show_bug.cgi?id=201336
https://bugs.webkit.org/show_bug.cgi?id=246106
https://bugs.webkit.org/show_bug.cgi?id=211617
Attachments:
Description Flags
Same code for reproduce the problem
none
text case (html code) none

Description Paul Li 2023-09-20 00:05:19 PDT
Created attachment 467781 [details]
Same code for reproduce the problem

Safari Version       : 17
OS                   : iOS 17


Steps to reproduce the problem
1. install iOS 17.
2. turn on safari and check inline SVG style which applied "filter". 

What is the expected behavior?
1. inline SVG should applied CSS > filter effect.

What went wrong?
1. inline SVG doesn't applied CSS > filter effect.

Check Sample code form attachment please.
Comment 1 Ahmad Saleem 2023-09-20 02:18:35 PDT
@Paul - Can you attach test case via attachment or JSFiddle or JSBin etc.?
Comment 2 Paul Li 2023-09-20 03:10:39 PDT
Created attachment 467784 [details]
text case (html code)

Here comes the test case.
Comment 3 Paul Li 2023-09-20 03:12:11 PDT
Expect:
Once turn to Dark mode, the SVG should applied CSS filter.
Comment 4 Radar WebKit Bug Importer 2023-09-20 14:32:06 PDT
<rdar://problem/115804577>
Comment 5 Karl Dubost 2023-09-20 16:47:44 PDT
There is a combination of two things here. Nested syntax and @media.
Maybe a more reduced test case would help.

Let's see.

Simpler test 

body {background-color: gold;}  
@media (prefers-color-scheme: light) {
  svg { filter: invert(1); }
}


This is confirmed. 

Maybe a duplicate of Bug 211617