LibWeb/CSS: Make empty GridTrackSize value serialize to "none"

This is the default value of the `grid-template-rows` and
`grid-template-columns` properties.
This commit is contained in:
Tim Ledbetter 2025-03-22 00:35:08 +00:00 committed by Alexander Kalenik
commit 7b0b6e7493
Notes: github-actions[bot] 2025-03-22 16:34:33 +00:00
13 changed files with 101 additions and 46 deletions

View file

@ -0,0 +1,25 @@
Harness status: OK
Found 20 tests
20 Pass
Pass Property grid-auto-columns has initial value auto
Pass Property grid-auto-columns does not inherit
Pass Property grid-auto-flow has initial value row
Pass Property grid-auto-flow does not inherit
Pass Property grid-auto-rows has initial value auto
Pass Property grid-auto-rows does not inherit
Pass Property grid-column-end has initial value auto
Pass Property grid-column-end does not inherit
Pass Property grid-column-start has initial value auto
Pass Property grid-column-start does not inherit
Pass Property grid-row-end has initial value auto
Pass Property grid-row-end does not inherit
Pass Property grid-row-start has initial value auto
Pass Property grid-row-start does not inherit
Pass Property grid-template-areas has initial value none
Pass Property grid-template-areas does not inherit
Pass Property grid-template-columns has initial value none
Pass Property grid-template-columns does not inherit
Pass Property grid-template-rows has initial value none
Pass Property grid-template-rows does not inherit

View file

@ -2,8 +2,8 @@ Harness status: OK
Found 40 tests
24 Pass
16 Fail
32 Pass
8 Fail
Pass Test getting grid-template-columns and grid-template-rows set through CSS for element 'gridWithFixedElement' : grid-template-columns = '7px 11px', grid-template-rows = '17px 2px'
Pass Test getting grid-template-columns and grid-template-rows set through CSS for element 'gridWithPercentElement' : grid-template-columns = '400px 800px', grid-template-rows = '150px 450px'
Fail Test getting grid-template-columns and grid-template-rows set through CSS for element 'gridWithPercentWithoutSize' : grid-template-columns = '3.5px 7px', grid-template-rows = '4px 12px'
@ -31,16 +31,16 @@ Pass Test getting and setting grid-template-rows and grid-template-columns throu
Pass Test getting and setting grid-template-rows and grid-template-columns through JS: grid-template-columns = '25px 20px', element.style.gridTemplateColumns = 'calc(25px) calc(2em)', grid-template-rows = '0px 60px', element.style.gridTemplateRows = 'auto calc(10%)'
Pass Test getting and setting grid-template-rows and grid-template-columns through JS: grid-template-columns = '345px 92px', element.style.gridTemplateColumns = 'calc(25px + 40%) minmax(min-content, calc(10% + 12px))', grid-template-rows = '100px 0px', element.style.gridTemplateRows = 'minmax(calc(75% - 350px), max-content) auto'
Fail Test setting wrong/invalid values through CSS
Fail Test setting bad JS values: grid-template-columns = 'none auto', grid-template-rows = 'none auto'
Fail Test setting bad JS values: grid-template-columns = 'none 16em', grid-template-rows = 'none 56%'
Fail Test setting bad JS values: grid-template-columns = 'none none', grid-template-rows = 'none none'
Fail Test setting bad JS values: grid-template-columns = 'auto none', grid-template-rows = 'auto none'
Fail Test setting bad JS values: grid-template-columns = 'auto none 16em', grid-template-rows = 'auto 18em none'
Fail Test setting bad JS values: grid-template-columns = '-webkit-fit-content -webkit-fit-content', grid-template-rows = '-webkit-fit-available -webkit-fit-available'
Pass Test setting bad JS values: grid-template-columns = 'none auto', grid-template-rows = 'none auto'
Pass Test setting bad JS values: grid-template-columns = 'none 16em', grid-template-rows = 'none 56%'
Pass Test setting bad JS values: grid-template-columns = 'none none', grid-template-rows = 'none none'
Pass Test setting bad JS values: grid-template-columns = 'auto none', grid-template-rows = 'auto none'
Pass Test setting bad JS values: grid-template-columns = 'auto none 16em', grid-template-rows = 'auto 18em none'
Pass Test setting bad JS values: grid-template-columns = '-webkit-fit-content -webkit-fit-content', grid-template-rows = '-webkit-fit-available -webkit-fit-available'
Fail Test setting bad JS values: grid-template-columns = '-10px minmax(16px, 32px)', grid-template-rows = 'minmax(10%, 15%) -10vw'
Fail Test setting bad JS values: grid-template-columns = '10px minmax(16px, -1vw)', grid-template-rows = 'minmax(-1%, 15%) 10vw'
Fail Test setting bad JS values: grid-template-columns = '10px calc(16px 30px)', grid-template-rows = 'calc(25px + auto) 2em'
Fail Test setting bad JS values: grid-template-columns = 'minmax(min-content, calc() 250px', grid-template-rows = 'calc(2em('
Pass Test setting bad JS values: grid-template-columns = 'minmax(min-content, calc() 250px', grid-template-rows = 'calc(2em('
Fail Test setting grid-template-columns and grid-template-rows to 'inherit' through JS
Fail Test the default value
Pass Test the default value
Fail Test setting grid-template-columns and grid-template-rows to 'initial' through JS

View file

@ -2,14 +2,14 @@ Harness status: OK
Found 63 tests
21 Pass
42 Fail
24 Pass
39 Fail
Fail e.style['grid'] = "none" should set grid-auto-columns
Fail e.style['grid'] = "none" should set grid-auto-flow
Fail e.style['grid'] = "none" should set grid-auto-rows
Pass e.style['grid'] = "none" should set grid-template-areas
Fail e.style['grid'] = "none" should set grid-template-columns
Fail e.style['grid'] = "none" should set grid-template-rows
Pass e.style['grid'] = "none" should set grid-template-columns
Pass e.style['grid'] = "none" should set grid-template-rows
Pass e.style['grid'] = "none" should not set unrelated longhands
Fail e.style['grid'] = "10px / 20%" should set grid-auto-columns
Fail e.style['grid'] = "10px / 20%" should set grid-auto-flow
@ -23,7 +23,7 @@ Fail e.style['grid'] = "none / 10px" should set grid-auto-flow
Fail e.style['grid'] = "none / 10px" should set grid-auto-rows
Pass e.style['grid'] = "none / 10px" should set grid-template-areas
Pass e.style['grid'] = "none / 10px" should set grid-template-columns
Fail e.style['grid'] = "none / 10px" should set grid-template-rows
Pass e.style['grid'] = "none / 10px" should set grid-template-rows
Pass e.style['grid'] = "none / 10px" should not set unrelated longhands
Fail e.style['grid'] = "fit-content(calc(-0.5em + 10px)) / fit-content(calc(0.5em + 10px))" should set grid-auto-columns
Fail e.style['grid'] = "fit-content(calc(-0.5em + 10px)) / fit-content(calc(0.5em + 10px))" should set grid-auto-flow

View file

@ -2,9 +2,9 @@ Harness status: OK
Found 32 tests
12 Pass
20 Fail
Fail Property grid-template-columns value 'none'
13 Pass
19 Fail
Pass Property grid-template-columns value 'none'
Pass Property grid-template-columns value '1px'
Pass Property grid-template-columns value '1px [a]'
Pass Property grid-template-columns value '1px [a] 2px'

View file

@ -2,9 +2,9 @@ Harness status: OK
Found 34 tests
26 Pass
8 Fail
Fail e.style['grid-template-columns'] = "none" should set the property value
27 Pass
7 Fail
Pass e.style['grid-template-columns'] = "none" should set the property value
Pass e.style['grid-template-columns'] = "10px" should set the property value
Pass e.style['grid-template-columns'] = "20%" should set the property value
Pass e.style['grid-template-columns'] = "calc(-0.5em + 10px)" should set the property value

View file

@ -2,9 +2,9 @@ Harness status: OK
Found 24 tests
10 Pass
14 Fail
Fail Property grid-template-rows value 'none'
11 Pass
13 Fail
Pass Property grid-template-rows value 'none'
Pass Property grid-template-rows value '1px'
Pass Property grid-template-rows value '1px [a]'
Pass Property grid-template-rows value '1px [a] 2px'

View file

@ -2,9 +2,9 @@ Harness status: OK
Found 34 tests
26 Pass
8 Fail
Fail e.style['grid-template-rows'] = "none" should set the property value
27 Pass
7 Fail
Pass e.style['grid-template-rows'] = "none" should set the property value
Pass e.style['grid-template-rows'] = "10px" should set the property value
Pass e.style['grid-template-rows'] = "20%" should set the property value
Pass e.style['grid-template-rows'] = "calc(-0.5em + 10px)" should set the property value

View file

@ -2,11 +2,11 @@ Harness status: OK
Found 24 tests
18 Pass
6 Fail
20 Pass
4 Fail
Pass e.style['grid-template'] = "none" should set grid-template-areas
Fail e.style['grid-template'] = "none" should set grid-template-columns
Fail e.style['grid-template'] = "none" should set grid-template-rows
Pass e.style['grid-template'] = "none" should set grid-template-columns
Pass e.style['grid-template'] = "none" should set grid-template-rows
Pass e.style['grid-template'] = "none" should not set unrelated longhands
Pass e.style['grid-template'] = "10px / 20%" should set grid-template-areas
Pass e.style['grid-template'] = "10px / 20%" should set grid-template-columns