mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:47:44 +00:00
LibWeb: Split GridAreaShorthandStyleValue out of StyleValue.{h,cpp}
This commit is contained in:
parent
4dc99e49a1
commit
675cb3b9da
8 changed files with 100 additions and 55 deletions
|
@ -25,6 +25,7 @@
|
|||
#include <LibWeb/CSS/StyleValues/FlexStyleValue.h>
|
||||
#include <LibWeb/CSS/StyleValues/FontStyleValue.h>
|
||||
#include <LibWeb/CSS/StyleValues/FrequencyStyleValue.h>
|
||||
#include <LibWeb/CSS/StyleValues/GridAreaShorthandStyleValue.h>
|
||||
#include <LibWeb/CSS/StyleValues/GridTemplateAreaStyleValue.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/HTML/BrowsingContext.h>
|
||||
|
@ -1035,20 +1036,6 @@ ErrorOr<String> GridTrackPlacementShorthandStyleValue::to_string() const
|
|||
return String::formatted("{} / {}", TRY(m_properties.start->grid_track_placement().to_string()), TRY(m_properties.end->grid_track_placement().to_string()));
|
||||
}
|
||||
|
||||
ErrorOr<String> GridAreaShorthandStyleValue::to_string() const
|
||||
{
|
||||
StringBuilder builder;
|
||||
if (!m_properties.row_start->as_grid_track_placement().grid_track_placement().is_auto())
|
||||
TRY(builder.try_appendff("{}", TRY(m_properties.row_start->as_grid_track_placement().grid_track_placement().to_string())));
|
||||
if (!m_properties.column_start->as_grid_track_placement().grid_track_placement().is_auto())
|
||||
TRY(builder.try_appendff(" / {}", TRY(m_properties.column_start->as_grid_track_placement().grid_track_placement().to_string())));
|
||||
if (!m_properties.row_end->as_grid_track_placement().grid_track_placement().is_auto())
|
||||
TRY(builder.try_appendff(" / {}", TRY(m_properties.row_end->as_grid_track_placement().grid_track_placement().to_string())));
|
||||
if (!m_properties.column_end->as_grid_track_placement().grid_track_placement().is_auto())
|
||||
TRY(builder.try_appendff(" / {}", TRY(m_properties.column_end->as_grid_track_placement().grid_track_placement().to_string())));
|
||||
return builder.to_string();
|
||||
}
|
||||
|
||||
ErrorOr<String> GridTrackPlacementStyleValue::to_string() const
|
||||
{
|
||||
return m_grid_track_placement.to_string();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue