diff options
Diffstat (limited to 'src/libserver/css/css_property.hxx')
-rw-r--r-- | src/libserver/css/css_property.hxx | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/libserver/css/css_property.hxx b/src/libserver/css/css_property.hxx index b72b655f9..973000b39 100644 --- a/src/libserver/css/css_property.hxx +++ b/src/libserver/css/css_property.hxx @@ -102,23 +102,28 @@ struct alignas(int) css_property { } /* Helpers to define which values are valid for which properties */ - constexpr auto is_color(void) const -> bool { + auto is_color(void) const -> bool { return type == css_property_type::PROPERTY_COLOR || type == css_property_type::PROPERTY_BACKGROUND || type == css_property_type::PROPERTY_BGCOLOR || type == css_property_type::PROPERTY_FONT_COLOR || type == css_property_type::PROPERTY_FONT; } - constexpr auto is_dimension(void) const -> bool { + auto is_dimension(void) const -> bool { return type == css_property_type::PROPERTY_HEIGHT || type == css_property_type::PROPERTY_WIDTH || type == css_property_type::PROPERTY_FONT_SIZE || type == css_property_type::PROPERTY_FONT; } - constexpr auto is_normal_number(void) const -> bool { + + auto is_normal_number(void) const -> bool { return type == css_property_type::PROPERTY_OPACITY; } + auto is_display(void) const -> bool { + return type == css_property_type::PROPERTY_DISPLAY; + } + auto operator==(const css_property &other) const { return type == other.type; } }; |