mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-28 05:52:53 +00:00
LibWeb: Treat "revert" as a CSS-wide keyword
This isn't included in the base definition of a CSS-wide keyword, but the CASCADE-4 spec which adds it says: > The revert CSS-wide keyword rolls back the cascade to the cascaded value of the earlier origin. So it is one. While I'm at it, rename `is_builtin()` to match the spec terminology. It's not used currently, but will be in the next commit.
This commit is contained in:
parent
aea112da71
commit
1c4a05f8a4
Notes:
sideshowbarker
2024-07-16 21:39:23 +09:00
Author: https://github.com/AtkinsSJ
Commit: 1c4a05f8a4
Pull-request: https://github.com/SerenityOS/serenity/pull/21168
2 changed files with 5 additions and 1 deletions
|
@ -71,10 +71,12 @@ Optional<ValueID> value_id_from_string(StringView);
|
|||
StringView string_from_value_id(ValueID);
|
||||
|
||||
// https://www.w3.org/TR/css-values-4/#common-keywords
|
||||
// https://drafts.csswg.org/css-cascade-4/#valdef-all-revert
|
||||
inline bool is_css_wide_keyword(StringView name)
|
||||
{
|
||||
return name.equals_ignoring_ascii_case("inherit"sv)
|
||||
|| name.equals_ignoring_ascii_case("initial"sv)
|
||||
|| name.equals_ignoring_ascii_case("revert"sv)
|
||||
|| name.equals_ignoring_ascii_case("unset"sv);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue