@@ -18,6 +18,7 @@
#include <array>
#include <string>
#include <string_view>
#include <tuple>
#include <utility>
#include <vector>
@@ -55,6 +56,11 @@ void inline_css_tests() {
expect_eq(styled->properties, std::vector{std::pair{css::PropertyId::FontSize, "2px"s}});
});
etest::test("inline css: doesn't explode", [] {
dom::Node dom = dom::Element{"div", {{"style", {"aaa"}}}};
std::ignore = style::style_tree(dom, {}, {});
});
etest::test("inline css: overrides the stylesheet", [] {
dom::Node dom = dom::Element{"div", {{"style", {"font-size:2px"}}}};
auto styled = style::style_tree(dom, {{css::Rule{{"div"}, {{css::PropertyId::FontSize, "2000px"}}}}}, {});