.headline) [8,8 100x17]
+ TextPaintable (TextNode<#text>)
+ PaintableWithLines (BlockContainer
.content) [8,25 400x100]
+ TextPaintable (TextNode<#text>)
diff --git a/Tests/LibWeb/Layout/input/grid/grid-placement-shorthand-single-custom-ident.html b/Tests/LibWeb/Layout/input/grid/grid-placement-shorthand-single-custom-ident.html
new file mode 100644
index 00000000000..b8555103d98
--- /dev/null
+++ b/Tests/LibWeb/Layout/input/grid/grid-placement-shorthand-single-custom-ident.html
@@ -0,0 +1,34 @@
+
+
+
+
\ No newline at end of file
diff --git a/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp b/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp
index 00d52171c66..01ac4b99748 100644
--- a/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp
+++ b/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp
@@ -6795,7 +6795,7 @@ RefPtr
Parser::parse_grid_auto_track_sizes(TokenStream Parser::parse_grid_track_placement(TokenStream& tokens)
+RefPtr Parser::parse_grid_track_placement(TokenStream& tokens)
{
// FIXME: This shouldn't be needed. Right now, the below code returns a CSSStyleValue even if no tokens are consumed!
if (!tokens.has_next_token())
@@ -6924,6 +6924,10 @@ RefPtr Parser::parse_grid_track_placement_shorthand_value(Propert
auto parsed_start_value = parse_grid_track_placement(track_start_placement_token_stream);
if (parsed_start_value && track_end_placement_tokens.is_empty()) {
transaction.commit();
+ if (parsed_start_value->grid_track_placement().has_identifier()) {
+ auto custom_ident = parsed_start_value.release_nonnull();
+ return ShorthandStyleValue::create(property_id, { start_property, end_property }, { custom_ident, custom_ident });
+ }
return ShorthandStyleValue::create(property_id,
{ start_property, end_property },
{ parsed_start_value.release_nonnull(), GridTrackPlacementStyleValue::create(GridTrackPlacement::make_auto()) });
diff --git a/Userland/Libraries/LibWeb/CSS/Parser/Parser.h b/Userland/Libraries/LibWeb/CSS/Parser/Parser.h
index 323074160b0..e9a937b9f89 100644
--- a/Userland/Libraries/LibWeb/CSS/Parser/Parser.h
+++ b/Userland/Libraries/LibWeb/CSS/Parser/Parser.h
@@ -322,7 +322,7 @@ private:
RefPtr parse_grid_auto_track_sizes(TokenStream&);
RefPtr parse_grid_auto_flow_value(TokenStream&);
RefPtr parse_grid_track_size_list_shorthand_value(PropertyID, TokenStream&);
- RefPtr parse_grid_track_placement(TokenStream&);
+ RefPtr parse_grid_track_placement(TokenStream&);
RefPtr parse_grid_track_placement_shorthand_value(PropertyID, TokenStream&);
RefPtr parse_grid_template_areas_value(TokenStream&);
RefPtr parse_grid_area_shorthand_value(TokenStream&);