mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 01:57: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
|
@ -60,6 +60,8 @@ public:
|
|||
static CSS::Length height() { return CSS::Length::make_auto(); }
|
||||
static CSS::Length min_height() { return CSS::Length::make_auto(); }
|
||||
static CSS::Length max_height() { return CSS::Length::make_auto(); }
|
||||
static Vector<CSS::GridTrackSize> grid_template_columns() { return Vector<CSS::GridTrackSize> {}; }
|
||||
static Vector<CSS::GridTrackSize> grid_template_rows() { return Vector<CSS::GridTrackSize> {}; }
|
||||
};
|
||||
|
||||
struct BackgroundLayerData {
|
||||
|
@ -170,6 +172,8 @@ public:
|
|||
CSS::LengthPercentage const& min_height() const { return m_noninherited.min_height; }
|
||||
CSS::LengthPercentage const& max_height() const { return m_noninherited.max_height; }
|
||||
Variant<CSS::VerticalAlign, CSS::LengthPercentage> const& vertical_align() const { return m_noninherited.vertical_align; }
|
||||
Vector<CSS::GridTrackSize> const& grid_template_columns() const { return m_noninherited.grid_template_columns; }
|
||||
Vector<CSS::GridTrackSize> const& grid_template_rows() const { return m_noninherited.grid_template_rows; }
|
||||
|
||||
CSS::LengthBox const& inset() const { return m_noninherited.inset; }
|
||||
const CSS::LengthBox& margin() const { return m_noninherited.margin; }
|
||||
|
@ -284,6 +288,8 @@ protected:
|
|||
CSS::BoxSizing box_sizing { InitialValues::box_sizing() };
|
||||
CSS::ContentData content;
|
||||
Variant<CSS::VerticalAlign, CSS::LengthPercentage> vertical_align { InitialValues::vertical_align() };
|
||||
Vector<CSS::GridTrackSize> grid_template_columns;
|
||||
Vector<CSS::GridTrackSize> grid_template_rows;
|
||||
} m_noninherited;
|
||||
};
|
||||
|
||||
|
@ -354,6 +360,8 @@ public:
|
|||
void set_box_sizing(CSS::BoxSizing value) { m_noninherited.box_sizing = value; }
|
||||
void set_vertical_align(Variant<CSS::VerticalAlign, CSS::LengthPercentage> value) { m_noninherited.vertical_align = value; }
|
||||
void set_visibility(CSS::Visibility value) { m_inherited.visibility = value; }
|
||||
void set_grid_template_columns(Vector<CSS::GridTrackSize> value) { m_noninherited.grid_template_columns = value; }
|
||||
void set_grid_template_rows(Vector<CSS::GridTrackSize> value) { m_noninherited.grid_template_rows = value; }
|
||||
|
||||
void set_fill(Color value) { m_inherited.fill = value; }
|
||||
void set_stroke(Color value) { m_inherited.stroke = value; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue