summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/select/properties.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/select/properties.c b/src/select/properties.c
index 9ca9d9f..3974f1e 100644
--- a/src/select/properties.c
+++ b/src/select/properties.c
@@ -4678,6 +4678,17 @@ css_error compose_text_align(const css_computed_style *parent,
if (type == CSS_TEXT_ALIGN_INHERIT) {
type = get_text_align(parent);
+ } else if (type == CSS_TEXT_ALIGN_INHERIT_IF_NON_MAGIC) {
+ /* This is purely for the benefit of HTML tables */
+ type = get_text_align(parent);
+
+ /* If the parent's text-align is a magical one,
+ * then reset to the default value. Otherwise,
+ * inherit as normal. */
+ if (type == CSS_TEXT_ALIGN_LIBCSS_LEFT ||
+ type == CSS_TEXT_ALIGN_LIBCSS_CENTER ||
+ type == CSS_TEXT_ALIGN_LIBCSS_RIGHT)
+ type = CSS_TEXT_ALIGN_DEFAULT;
}
return set_text_align(result, type);