https://codepen.io/tigt/pen/d820feb6082472382ec0778063e9ac08?editors=1100
This is about ordering. If the <svg> comes after the <img>, it works.
The filter element build() functions return null if they have no renderer yet. What we need to do is to invalidate the filtered element when the filter renderers change.
I think the main difference between SVG and CSS filters here is that SVG builds the filter chain at paint time, but CSS builds it at style change time, which is too early because we're still building the render tree at that point.
I am able to reproduce this bug in Safari 15.5 on macOS 12.4 based on codepen mentioned in Description. Safari 15.5 shows lightening as "blue" while all other browsers (Chrome Canary 105 and Firefox Nightly 104) shows it as "red". Thanks!
<rdar://problem/97210640>
(In reply to Ahmad Saleem from comment #4) > I am able to reproduce this bug in Safari 15.5 on macOS 12.4 based on > codepen mentioned in Description. Safari 15.5 shows lightening as "blue" > while all other browsers (Chrome Canary 105 and Firefox Nightly 104) shows > it as "red". Thanks! I am not able to reproduce this in Safari 16.4 and now it show a 'red' lightening similar to other browsers. Marking this as "RESOLVED CONFIGURATION CHANGED". Thanks!