mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:57:35 +00:00
LibWeb: Basic support for CSS text-indent: <length-percentage>
Note that this simple form of text-indent only affects the first line of formatted content in each block. Percentages are resolved against the width of the block.
This commit is contained in:
parent
9c2d496dbe
commit
5d4e9a0673
6 changed files with 55 additions and 0 deletions
|
@ -507,6 +507,9 @@ void NodeWithStyle::apply_style(const CSS::StyleProperties& computed_style)
|
|||
if (text_align.has_value())
|
||||
computed_values.set_text_justify(text_justify.value());
|
||||
|
||||
if (auto text_indent = computed_style.length_percentage(CSS::PropertyID::TextIndent); text_indent.has_value())
|
||||
computed_values.set_text_indent(text_indent.release_value());
|
||||
|
||||
auto white_space = computed_style.white_space();
|
||||
if (white_space.has_value())
|
||||
computed_values.set_white_space(white_space.value());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue