Skip to content

Add mix-blend-mode property support#1148

Merged
devongovett merged 1 commit intoparcel-bundler:masterfrom
ElirazKed:add-blend-mode-properties
Feb 18, 2026
Merged

Add mix-blend-mode property support#1148
devongovett merged 1 commit intoparcel-bundler:masterfrom
ElirazKed:add-blend-mode-properties

Conversation

@ElirazKed
Copy link
Contributor

Adds typed property support for mix-blend-mode, which currently falls through
to the Unparsed/custom property bucket.

This introduces a BlendMode enum in src/properties/effects.rs using
enum_property!, covering all 18 keywords from the
https://www.w3.org/TR/compositing-1/#ltblendmodegt spec:

normal | multiply | screen | overlay | darken | lighten | color-dodge |
color-burn | hard-light | soft-light | difference | exclusion | hue |
saturation | color | luminosity | plus-darker | plus-lighter

Changes

  • src/properties/effects.rs — Define BlendMode enum via enum_property!
  • src/properties/mod.rs — Register "mix-blend-mode": MixBlendMode(BlendMode)
    in define_properties!
  • src/lib.rs — Add tests for all 18 keywords

Notes

  • The BlendMode enum is intentionally reusable for a follow-up
    background-blend-mode addition (which takes a comma-separated list and would
    need SmallVec<[BlendMode; 1]>)
  • Follows the same pattern as Resize, Visibility, and other simple keyword
    properties
  • Full test suite passes

Add typed parsing for the mix-blend-mode CSS property using a BlendMode
enum with all 18 standard blend mode keywords from the CSS Compositing
spec. Previously this property fell through to the generic custom
property handler.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@devongovett devongovett merged commit da5b491 into parcel-bundler:master Feb 18, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants