mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 11:37:44 +00:00
LibWeb: Teach CSS::StyleProperties to create CSS::Size values
You can now use StyleProperties::size_value(CSS::PropertyID) to extract a CSS::Size for a given property.
This commit is contained in:
parent
ba78fe008f
commit
844321d89f
3 changed files with 40 additions and 1 deletions
|
@ -41,6 +41,7 @@ public:
|
|||
void set_property(CSS::PropertyID, NonnullRefPtr<StyleValue> value);
|
||||
NonnullRefPtr<StyleValue> property(CSS::PropertyID) const;
|
||||
|
||||
CSS::Size size_value(CSS::PropertyID) const;
|
||||
Length length_or_fallback(CSS::PropertyID, Length const& fallback) const;
|
||||
LengthPercentage length_percentage_or_fallback(CSS::PropertyID, LengthPercentage const& fallback) const;
|
||||
Optional<LengthPercentage> length_percentage(CSS::PropertyID) const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue