1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 18:18:12 +00:00

LibWeb: Add an enum for !important

This commit is contained in:
Sam Atkins 2022-02-12 14:53:59 +00:00 committed by Linus Groh
parent c08a52dd97
commit a99d02e14d
8 changed files with 21 additions and 15 deletions

View file

@ -562,14 +562,14 @@ void dump_style_rule(StringBuilder& builder, CSS::CSSStyleRule const& rule, int
for (auto& property : style_declaration.properties()) {
indent(builder, indent_levels);
builder.appendff(" {}: '{}'", CSS::string_from_property_id(property.property_id), property.value->to_string());
if (property.important)
if (property.important == CSS::Important::Yes)
builder.append(" \033[31;1m!important\033[0m");
builder.append('\n');
}
for (auto& property : style_declaration.custom_properties()) {
indent(builder, indent_levels);
builder.appendff(" {}: '{}'", property.key, property.value.value->to_string());
if (property.value.important)
if (property.value.important == CSS::Important::Yes)
builder.append(" \033[31;1m!important\033[0m");
builder.append('\n');
}