mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:07:35 +00:00
LibWeb: Implement CSS unset
builtin value
This is equivalent to `initial` or `inherit`, depending on if the property is inherited by default.
This commit is contained in:
parent
3296fd70b3
commit
b92a6d6542
3 changed files with 32 additions and 3 deletions
|
@ -71,6 +71,13 @@ Optional<NonnullRefPtr<StyleValue>> StyleProperties::property(CSS::PropertyID id
|
|||
return fetch_initial(id);
|
||||
if (value->is_inherit())
|
||||
return fetch_inherited(id);
|
||||
if (value->is_unset()) {
|
||||
if (is_inherited_property(id)) {
|
||||
return fetch_inherited(id);
|
||||
} else {
|
||||
return fetch_initial(id);
|
||||
}
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue