diff options
author | Aliaksandr Kalenik <kalenik.aliaksandr@gmail.com> | 2023-05-27 02:58:19 +0300 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2023-05-27 05:47:14 +0200 |
commit | ab5b89eb95964592386f260caa90fbb2e7b83433 (patch) | |
tree | cc5705ecdc085997fa638afc5c53570fecac5713 /Tests/LibWeb/Layout | |
parent | 1e526af430a5028302688996348f6aff2e4e93d5 (diff) | |
download | serenity-ab5b89eb95964592386f260caa90fbb2e7b83433.zip |
LibWeb: Add basic parsing of grid shorthand CSS property
Introduces incomplete parsing of grid shorthand property. Only
<grid-template> part of syntax is supported for now but it is enough
to significantly improve rendering of websites that use this shorthand
to define grid :)
Diffstat (limited to 'Tests/LibWeb/Layout')
-rw-r--r-- | Tests/LibWeb/Layout/expected/grid/grid-shorthand-property.txt | 5 | ||||
-rw-r--r-- | Tests/LibWeb/Layout/input/grid/grid-shorthand-property.html | 10 |
2 files changed, 15 insertions, 0 deletions
diff --git a/Tests/LibWeb/Layout/expected/grid/grid-shorthand-property.txt b/Tests/LibWeb/Layout/expected/grid/grid-shorthand-property.txt new file mode 100644 index 0000000000..19ec62190a --- /dev/null +++ b/Tests/LibWeb/Layout/expected/grid/grid-shorthand-property.txt @@ -0,0 +1,5 @@ +Viewport <#document> at (0,0) content-size 800x600 children: not-inline + BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline + BlockContainer <body> at (8,8) content-size 784x100 children: not-inline + Box <div.container> at (8,8) content-size 784x100 [GFC] children: not-inline + BlockContainer <div.item> at (8,8) content-size 200x100 [BFC] children: not-inline diff --git a/Tests/LibWeb/Layout/input/grid/grid-shorthand-property.html b/Tests/LibWeb/Layout/input/grid/grid-shorthand-property.html new file mode 100644 index 0000000000..8b9c7a4475 --- /dev/null +++ b/Tests/LibWeb/Layout/input/grid/grid-shorthand-property.html @@ -0,0 +1,10 @@ +<style> +.container { + display: grid; + grid: 100px / 200px; +} + +.item { + background-color: navy; +} +</style><div class="container"><div class="item"></div></div>
\ No newline at end of file |