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

LibWeb: Implement the CSS all property

This sets all longhand values to one of initial, inherit, unset or
revert. Note that revert is not supported yet, but will be soon.
This commit is contained in:
Andreas Kling 2023-07-29 10:53:24 +02:00
parent de31a8a425
commit 13d5d47b56
5 changed files with 62 additions and 2 deletions

View file

@ -105,6 +105,7 @@ namespace Web::CSS {
enum class PropertyID {
Invalid,
Custom,
All,
)~~~"));
Vector<DeprecatedString> shorthand_property_ids;
@ -361,6 +362,8 @@ Optional<PropertyID> property_id_from_camel_case_string(StringView string)
Optional<PropertyID> property_id_from_string(StringView string)
{
if (Infra::is_ascii_case_insensitive_match(string, "all"sv))
return PropertyID::All;
)~~~"));
TRY(properties.try_for_each_member([&](auto& name, auto& value) -> ErrorOr<void> {