mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-28 23:39:02 +00:00
LibHTML: Add InheritStyleValue and InitialStyleValue.
These correspond to the 'inherit' and 'initial' CSS values respectively.
This commit is contained in:
parent
105a97685e
commit
9526b0e13a
Notes:
sideshowbarker
2024-07-19 13:23:06 +09:00
Author: https://github.com/awesomekling
Commit: 9526b0e13a
2 changed files with 35 additions and 0 deletions
|
@ -13,6 +13,10 @@ NonnullRefPtr<StyleValue> parse_css_value(const StringView& view)
|
|||
unsigned as_uint = string.to_uint(ok);
|
||||
if (ok)
|
||||
return LengthStyleValue::create(Length(as_uint, Length::Type::Absolute));
|
||||
if (string == "inherit")
|
||||
return InheritStyleValue::create();
|
||||
if (string == "initial")
|
||||
return InitialStyleValue::create();
|
||||
if (string == "auto")
|
||||
return LengthStyleValue::create(Length());
|
||||
return StringStyleValue::create(string);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue