System/Libraries/Css+Html: Handle text-align: left

This commit is contained in:
Alec Murphy 2025-04-22 15:45:39 -04:00
parent 1cf0007b0b
commit 453d6f35a5
2 changed files with 3 additions and 0 deletions

View file

@ -3,6 +3,7 @@
#define CSS_DISPLAY_INLINE 2
#define CSS_DISPLAY_INLINE_BLOCK 3
#define CSS_TEXT_ALIGN_LEFT 0
#define CSS_TEXT_ALIGN_CENTER 1
#define CSS_TEXT_ALIGN_RIGHT 2

View file

@ -438,6 +438,8 @@ Bool @apply_css_rules_to_node(@html_dom_node* node, HtmlRenderer* renderer)
node->height = Str2I64(node_tmpnum_buf);
}
if (!StrICmp(key->name, "text-align") && !StrICmp(values->@(0), "left"))
node->textAlign = CSS_TEXT_ALIGN_LEFT;
if (!StrICmp(key->name, "text-align") && !StrICmp(values->@(0), "center"))
node->textAlign = CSS_TEXT_ALIGN_CENTER;
if (!StrICmp(key->name, "text-align") && !StrICmp(values->@(0), "right"))