mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:07:45 +00:00
LibWeb: Parse grid-template-columns and grid-template-rows
Add functionality to begin parsing grid-template-columns and grid-template-rows. There are still things to be added, like parsing functions, but I would say a couple of the major points are already adressed like length, percentage, and flexible-length.
This commit is contained in:
parent
c40dd9ee78
commit
92a00648b1
8 changed files with 87 additions and 0 deletions
|
@ -655,4 +655,16 @@ Optional<CSS::FontVariant> StyleProperties::font_variant() const
|
|||
return value_id_to_font_variant(value->to_identifier());
|
||||
}
|
||||
|
||||
Vector<CSS::GridTrackSize> StyleProperties::grid_template_columns() const
|
||||
{
|
||||
auto value = property(CSS::PropertyID::GridTemplateColumns);
|
||||
return value->as_grid_track_size().grid_track_size();
|
||||
}
|
||||
|
||||
Vector<CSS::GridTrackSize> StyleProperties::grid_template_rows() const
|
||||
{
|
||||
auto value = property(CSS::PropertyID::GridTemplateRows);
|
||||
return value->as_grid_track_size().grid_track_size();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue