fix(css): reconcile phantom properties (filter, backdrop-filter, text-shadow, overflow-wrap)#29
Merged
Merged
Conversation
…unrendered props The schema advertised properties the engine never painted: - css filter: consumed nowhere although the animator writes it (blur_in/blur_out presets were mute). Now applied as a Skia image filter on the node's group layer (shared with opacity). All 10 FilterFn functions implemented: blur/drop-shadow as image filters, the rest as CSS Filter Effects spec color matrices (translation column verified to be 0..1-space by an invert regression test). - backdrop-filter: implemented via Skia backdrop save-layer clipped to the rounded border-box, before the node's own background paints (glassmorphism), with a pixel test on a hard boundary. - css text-shadow (list form): parsed and silently dropped; now bridged into the Text and Counter painters (component-level field wins, all css shadows painted in reverse order so the first is on top). - overflow-wrap / text-overflow: accepted but unrendered — validate now emits explicit warnings instead of staying silent (removal would break existing scenarios: CssStyle is deny_unknown_fields).
This was referenced Jul 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #12.
Goal: the schema stops advertising properties the engine ignores.
filterimplemented (was written by the animator —blur_in/blur_outpresets were mute — and by static styles, consumed nowhere): applied as a Skia image filter on the node's group layer, shared with opacity. All 10FilterFnfunctions: blur & drop-shadow as image filters; brightness/contrast/saturate/grayscale/hue-rotate/invert/sepia/opacity as CSS Filter Effects spec color matrices. The Skia matrix translation convention (0..1 space) is locked by aninvert(1)pixel regression test — the first implementation used 0..255 and the test caught it.backdrop-filterimplemented: backdrop save-layer clipped to the rounded border-box, composited before the node's own background — real glassmorphism. Pixel test: a hard black/white boundary stays sharp outside the panel and smears to greys inside it.text-shadow(list) bridged into Text and Counter painters viaTextShadow::to_schema+Color::to_css_string; the component-level field keeps precedence; multiple shadows paint in reverse order (first on top).overflow-wrap/text-overflow: still parsed (removal would break existing scenarios —CssStyleisdeny_unknown_fields) butrustmotion validatenow warns they are not rendered yet.Tests: 5 new (backdrop pixel test, filter blur edges, invert convention, text-shadow bridge, validator warnings) — written red first. 138 total, all green.
Verify:
cargo test --workspace✓ ·cargo fmt --check✓ · clippy 0 warnings ✓