mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:17:44 +00:00
LibWeb: Support multi-keyword syntax for CSS display property
The Display class already supported all specific values, and now they will be parsed too. The display property now has a special type DisplayStyleValue.
This commit is contained in:
parent
81c11bc6f2
commit
31e1be0438
13 changed files with 249 additions and 55 deletions
|
@ -20,6 +20,7 @@
|
|||
#include <LibWeb/CSS/StyleValues/ColorStyleValue.h>
|
||||
#include <LibWeb/CSS/StyleValues/ConicGradientStyleValue.h>
|
||||
#include <LibWeb/CSS/StyleValues/ContentStyleValue.h>
|
||||
#include <LibWeb/CSS/StyleValues/DisplayStyleValue.h>
|
||||
#include <LibWeb/CSS/StyleValues/EdgeStyleValue.h>
|
||||
#include <LibWeb/CSS/StyleValues/FilterValueListStyleValue.h>
|
||||
#include <LibWeb/CSS/StyleValues/FlexFlowStyleValue.h>
|
||||
|
@ -141,6 +142,12 @@ ContentStyleValue const& StyleValue::as_content() const
|
|||
return static_cast<ContentStyleValue const&>(*this);
|
||||
}
|
||||
|
||||
DisplayStyleValue const& StyleValue::as_display() const
|
||||
{
|
||||
VERIFY(is_display());
|
||||
return static_cast<DisplayStyleValue const&>(*this);
|
||||
}
|
||||
|
||||
EdgeStyleValue const& StyleValue::as_edge() const
|
||||
{
|
||||
VERIFY(is_edge());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue