diff --git a/src/document/css/property.h b/src/document/css/property.h
index 4d3e8fb9b..58a6371d9 100644
--- a/src/document/css/property.h
+++ b/src/document/css/property.h
@@ -74,7 +74,7 @@ union css_property_value {
color_T color;
enum css_display display;
struct {
- enum text_style_format add, rem;
+ text_style_format_T add, rem;
} font_attribute;
enum format_align text_align;
enum css_list_style list_style;
diff --git a/src/document/format.h b/src/document/format.h
index 447764d20..dc52984ad 100644
--- a/src/document/format.h
+++ b/src/document/format.h
@@ -25,13 +25,15 @@ enum text_style_format {
AT_NO_ENTITIES = 64,
};
+typedef unsigned short text_style_format_T;
+
struct text_style_color {
color_T foreground;
color_T background;
};
struct text_style {
- enum text_style_format attr;
+ text_style_format_T attr;
struct text_style_color color;
};
diff --git a/src/document/html/parser/link.c b/src/document/html/parser/link.c
index a6843ffca..bd5035e7b 100644
--- a/src/document/html/parser/link.c
+++ b/src/document/html/parser/link.c
@@ -194,7 +194,7 @@ put_image_label(char *a, char *label,
struct html_context *html_context)
{
color_T saved_foreground;
- enum text_style_format saved_attr;
+ text_style_format_T saved_attr;
/* This is not 100% appropriate for , but well, accepting
* accesskey and tabindex near is just our little
diff --git a/src/document/xml/tags.c b/src/document/xml/tags.c
index 551f18586..3676da5aa 100644
--- a/src/document/xml/tags.c
+++ b/src/document/xml/tags.c
@@ -1768,7 +1768,7 @@ put_image_label(struct source_renderer *renderer, void *node, unsigned char *lab
{
struct html_context *html_context = renderer->html_context;
color_T saved_foreground;
- enum text_style_format saved_attr;
+ text_style_format_T saved_attr;
/* This is not 100% appropriate for , but well, accepting
* accesskey and tabindex near is just our little