1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 02:28:12 +00:00

LibWeb: Compute text-decoration-thickness values

This commit is contained in:
Karol Kosek 2022-03-06 19:48:09 +01:00 committed by Andreas Kling
parent 0f7156ed81
commit b6b116d5f2
3 changed files with 16 additions and 3 deletions

View file

@ -430,6 +430,8 @@ void NodeWithStyle::apply_style(const CSS::StyleProperties& specified_style)
// we just manually grab the value from `color`. This makes it dependent on `color` being
// specified first, so it's far from ideal.
computed_values.set_text_decoration_color(specified_style.color_or_fallback(CSS::PropertyID::TextDecorationColor, *this, computed_values.color()));
if (auto maybe_text_decoration_thickness = specified_style.length_percentage(CSS::PropertyID::TextDecorationThickness); maybe_text_decoration_thickness.has_value())
computed_values.set_text_decoration_thickness(maybe_text_decoration_thickness.release_value());
computed_values.set_z_index(specified_style.z_index());
computed_values.set_opacity(specified_style.opacity());