mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-10 18:10:56 +09:00
LibWeb: Add parsing for flex-wrap property
This commit is contained in:
parent
72d5394b8c
commit
e6545d5259
Notes:
sideshowbarker
2024-07-18 16:49:57 +09:00
Author: https://github.com/TobyAsE
Commit: e6545d5259
Pull-request: https://github.com/SerenityOS/serenity/pull/7669
Reviewed-by: https://github.com/alimpfard
Reviewed-by: https://github.com/awesomekling
7 changed files with 38 additions and 0 deletions
|
@ -240,6 +240,23 @@ Optional<CSS::FlexDirection> StyleProperties::flex_direction() const
|
|||
}
|
||||
}
|
||||
|
||||
Optional<CSS::FlexWrap> StyleProperties::flex_wrap() const
|
||||
{
|
||||
auto value = property(CSS::PropertyID::FlexWrap);
|
||||
if (!value.has_value())
|
||||
return {};
|
||||
switch (value.value()->to_identifier()) {
|
||||
case CSS::ValueID::Wrap:
|
||||
return CSS::FlexWrap::Wrap;
|
||||
case CSS::ValueID::Nowrap:
|
||||
return CSS::FlexWrap::Nowrap;
|
||||
case CSS::ValueID::WrapReverse:
|
||||
return CSS::FlexWrap::WrapReverse;
|
||||
default:
|
||||
return {};
|
||||
}
|
||||
}
|
||||
|
||||
Optional<CSS::Position> StyleProperties::position() const
|
||||
{
|
||||
auto value = property(CSS::PropertyID::Position);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue