LibWeb: Set correct longhand values when using grid-placement shorthand

According to https://www.w3.org/TR/css-grid-2/#placement-shorthands
when setting the 'grid-row' and 'grid-column' shorthand property to a
single <custom-ident> value, both 'grid-row-start'/'grid-column-start'
and 'grid-row-end'/'grid-column-end' should be set to that
<custom_ident>.
This commit is contained in:
Adam Harald Jørgensen 2024-08-28 16:47:30 +02:00 committed by Andreas Kling
commit 3e92ec80f3
Notes: github-actions[bot] 2024-08-29 05:00:53 +00:00
4 changed files with 67 additions and 2 deletions

View file

@ -0,0 +1,34 @@
<!DOCTYPE html>
<html lang="en">
<style>
.grid-container {
display: grid;
grid-template-rows:
[headline-start]
auto
[headline-end content-start]
auto
[content-end];
grid-template-columns:
[content-start title-start]
100px
[title-end]
repeat(3, 100px)
[content-end];
}
.headline {
grid-row: headline;
grid-column: title;
background-color: lightsalmon;
}
.content {
height: 100px;
grid-row: content;
grid-column: content;
background-color: lightblue;
}
</style>
<div class="grid-container">
<div class="headline">Headline</div>
<div class="content">Content</div>
</div>