Skip to content

Commit 80350a9

Browse files
committed
fix(layout): update flexbox defaults for overflow scroll
1 parent a4c5889 commit 80350a9

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

docs/component-model/layout-engine.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,8 @@ Add `--` prefix to use a CSS variable as an argument. The engine will pass it as
146146
| Rule | Arguments | Defaults | Properties |
147147
|----------|---------------|----------|-----------------------------------------------|
148148
| block | [align:value] | block | `display: block`<br>`text-align: [align]` |
149-
| inline | | --- | `display: inline`<br>`display: [type]-inline` |
150-
| contents | | --- | `display: contents` |
149+
| inline | --- | --- | `display: inline`<br>`display: [type]-inline` |
150+
| contents | --- | --- | `display: contents` |
151151
| hidden | --- | --- | `display: none` |
152152

153153
The `inline` rule can be used after other display types to make the element inline with corresponding type:
@@ -208,8 +208,8 @@ Use following examples as a reference:
208208
| width | [base:dim.]:[min:dim.]:[max:dim.] | --- | `width: [base]`<br>`min-width: [min]`<br>`max-width: [max]` |
209209
| height | [base:dim.]:[min:dim.]:[max:dim.] | --- | `height: [base]`<br>`min-height: [min]`<br>`max-height: [max]` |
210210
| ratio | [value] | --- | `aspect-ratio: [value]` |
211-
| overflow | [type:value]<br>[axis:value]:[type:value] | overflow:hidden | `overflow: [type]`<br>`overflow-[axis]: [type]`<br>For `scroll` type:<br>`flex-basis: 0`<br>`overscroll-behavior: contain`<br>`--webkit-overflow-scrolling: touch` |
212-
| margin | [v1:dim.]:[v2:dim.]:[v3:dim.]:[v4:dim.]<br>[side:value]:[v1:dimension] | margin:1<br>margin:[side]:1 | `margin: [v1] [v2] [v3] [v4]`<br>`margin-[side]: [v1]` | |
211+
| overflow | [type:value]<br>[axis:value]:[type:value] | overflow:hidden | `overflow: [type]`<br>`overflow-[axis]: [type]`<br>When `scroll` also:<br>`flex: 1 1 0`<br>`overscroll-behavior: contain`<br>`--webkit-overflow-scrolling: touch` |
212+
| margin | [v1:dim.]:[v2:dim.]:[v3:dim.]:[v4:dim.]<br>[side:value]:[v1:dimension] | margin:1<br>margin:[side]:1 | `margin: [v1] [v2] [v3] [v4]`<br>`margin-[side]` |
213213

214214
### Position
215215

src/template/layout.js

+1
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ const rules = {
8888
[`overflow${type}`]: value,
8989
...(value === "scroll"
9090
? {
91+
"flex-grow": props["flex-grow"] || 1,
9192
"flex-basis": 0,
9293
"overscroll-behavior": "contain",
9394
"--webkit-overflow-scrolling": "touch",

0 commit comments

Comments
 (0)