Skip to content

Commit caac75d

Browse files
dfaure-kdabogoffart
authored andcommitted
Docs fix: the default value for row and col in a GridLayout isn't 0
If you set row and col to 0 for multiple cells, they all end up at 0,0. So the default value isn't that. It's more something like "auto" where the col is one more than the col of the previous cell, or 0 if there was a Row in between. But it's not like people can write col: auto, so I hope the made up "auto" keyword here isn't too confusing; the alternative would be to remove the printing of a default value from the docs, not sure if that's possible.
1 parent 4c7658b commit caac75d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

docs/astro/src/content/docs/reference/layouts/gridlayout.mdx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,12 @@ To target specific sides with different values use the following properties:
9595
Cell elements inside a `GridLayout` obtain the following new properties. Any bindings to these properties must be compile-time constants:
9696

9797
### row
98-
<SlintProperty propName="row" typeName="int">
98+
<SlintProperty propName="row" typeName="int" defaultValue="auto">
9999
The index of the element's row within the grid. Setting this property resets the element's column to zero, unless explicitly set.
100100
</SlintProperty>
101101

102102
### col
103-
<SlintProperty propName="col" typeName="int">
103+
<SlintProperty propName="col" typeName="int" defaultValue="auto">
104104
The index of the element's column within the grid. Set this property to override the sequential column assignment (e.g., to skip a column).
105105
</SlintProperty>
106106

@@ -149,4 +149,3 @@ export component Foo inherits Window {
149149
}
150150
}
151151
```
152-

0 commit comments

Comments
 (0)