#ifndef LH_STYLE_H #define LH_STYLE_H #include "background.h" #include "css_length.h" #include "css_position.h" #include "css_tokenizer.h" #include "gradient.h" #include "web_color.h" namespace litehtml { struct invalid {}; // indicates "not found" condition in style::get_property struct inherit {}; // "inherit" was specified as the value of this property struct property_value : variant< invalid, inherit, int, int_vector, css_length, length_vector, float, web_color, vector, string, string_vector, size_vector, css_token_vector > { bool m_important = false; bool m_has_var = false; // css_token_vector, parsing is delayed because of var() property_value() {} template property_value(const T& val, bool important, bool has_var = false) : base(val), m_important(important), m_has_var(has_var) {} }; class html_tag; typedef std::map props_map; // represents a style block, eg. "color: black; display: inline" class style { public: typedef std::shared_ptr