diff options
Diffstat (limited to 'Tests/LibWeb/Layout/input/grid/named-tracks.html')
-rw-r--r-- | Tests/LibWeb/Layout/input/grid/named-tracks.html | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/Tests/LibWeb/Layout/input/grid/named-tracks.html b/Tests/LibWeb/Layout/input/grid/named-tracks.html new file mode 100644 index 0000000000..346fc043b5 --- /dev/null +++ b/Tests/LibWeb/Layout/input/grid/named-tracks.html @@ -0,0 +1,62 @@ +<style> + body { + font-family: 'SerenitySans'; + } + + .grid-container { + display: grid; + background-color: lightsalmon; + } + + .grid-item { + background-color: lightblue; + } +</style> + +<!-- Should render a 2 columned grid --> +<div class="grid-container" style=" + grid-template-columns: + [a] auto + [b] auto; + "> + <div class="grid-item" style="grid-column-start: a;">1</div> + <div class="grid-item" style="grid-column-start: b;">2</div> +</div> + +<!-- Example from https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Grid_Layout/Layout_using_Named_Grid_Lines--> +<!-- Named tracks there should be 4 grid items in a circle with a space in the middle --> +<div class="grid-container" style=" + grid-template-columns: [main-start] 1fr [content-start] 1fr [content-end] 1fr [main-end]; + grid-template-rows: [main-start] 25px [content-start] 25px [content-end] 25px [main-end]; + "> + <div class="grid-item" style=" + grid-column-start: main-start; + grid-row-start: main-start; + grid-row-end: main-end; + ">1</div> + <div class="grid-item" style=" + grid-column-start: content-end; + grid-row-start: main-start; + grid-row-end: content-end; + ">2</div> + <div class="grid-item" style=" + grid-column-start: content-start; + grid-row-start: main-start; + ">3</div> + <div class="grid-item" style=" + grid-column-start: content-start; + grid-column-end: main-end; + grid-row-start: content-end; + ">4</div> +</div> + +<!-- Named lines inside repeat --> +<!-- Should render 2 50px columns and 2 100px columns, with grid-item 1 starting at column 2 --> +<div class="grid-container" style=" + grid-template-columns: repeat(2, [name1] 50px [name2] 100px); + "> + <div class="grid-item" style="grid-column-start: name2;">1</div> + <div class="grid-item">2</div> + <div class="grid-item">3</div> + <div class="grid-item">4</div> +</div>
\ No newline at end of file |