mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:17:44 +00:00
LibWeb: Use IdentifierStyleValue for CSS 'position'
This commit is contained in:
parent
3247ea3581
commit
dd2e8b7dd0
6 changed files with 38 additions and 15 deletions
|
@ -38,6 +38,7 @@ public:
|
|||
static CSS::Clear clear() { return CSS::Clear::None; }
|
||||
static CSS::WhiteSpace white_space() { return CSS::WhiteSpace::Normal; }
|
||||
static CSS::TextAlign text_align() { return CSS::TextAlign::Left; }
|
||||
static CSS::Position position() { return CSS::Position::Static; }
|
||||
};
|
||||
|
||||
struct BorderData {
|
||||
|
@ -76,7 +77,7 @@ protected:
|
|||
CSS::Clear m_clear { InitialValues::clear() };
|
||||
Optional<int> m_z_index;
|
||||
CSS::TextAlign m_text_align { InitialValues::text_align() };
|
||||
CSS::Position m_position;
|
||||
CSS::Position m_position { InitialValues::position() };
|
||||
CSS::WhiteSpace m_white_space { InitialValues::white_space() };
|
||||
CSS::Length m_width;
|
||||
CSS::Length m_min_width;
|
||||
|
|
|
@ -219,7 +219,9 @@ void NodeWithStyle::apply_style(const CSS::StyleProperties& specified_style)
|
|||
{
|
||||
auto& style = static_cast<MutableLayoutStyle&>(m_style);
|
||||
|
||||
style.set_position(specified_style.position());
|
||||
auto position = specified_style.position();
|
||||
if (position.has_value())
|
||||
style.set_position(position.value());
|
||||
|
||||
auto text_align = specified_style.text_align();
|
||||
if (text_align.has_value())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue