mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:47:45 +00:00
LibWeb: Implement mask-type
CSS property
This property allows specifying if a mask is an alpha or luminance mask. See: https://drafts.fxtf.org/css-masking/#the-mask-type
This commit is contained in:
parent
b0d75ef096
commit
479451498b
9 changed files with 43 additions and 2 deletions
|
@ -778,6 +778,9 @@ void NodeWithStyle::apply_style(const CSS::StyleProperties& computed_style)
|
|||
else if (stroke_width->is_percentage())
|
||||
computed_values.set_stroke_width(CSS::LengthPercentage { stroke_width->as_percentage().percentage() });
|
||||
|
||||
if (auto mask_type = computed_style.mask_type(); mask_type.has_value())
|
||||
computed_values.set_mask_type(*mask_type);
|
||||
|
||||
if (auto mask = computed_style.property(CSS::PropertyID::Mask); mask->is_url())
|
||||
computed_values.set_mask(mask->as_url().url());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue