Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grid resize shorthand handling #6580

Closed
ruggi opened this issue Oct 22, 2024 · 0 comments · Fixed by #6581
Closed

Grid resize shorthand handling #6580

ruggi opened this issue Oct 22, 2024 · 0 comments · Fixed by #6581
Assignees

Comments

@ruggi
Copy link
Contributor

ruggi commented Oct 22, 2024

No description provided.

@ruggi ruggi self-assigned this Oct 22, 2024
ruggi added a commit that referenced this issue Oct 25, 2024
…#6581)

**Problem:**

If a grid is configured with the `gridTemplate` shorthand, resizing the
grid does not handle that correctly.

**Fix:**

This PR handles `gridTemplate` shorthands during template changes via
the canvas.
**An incremental PR will do the same for the inspector template
editing**.

For example, if a grid is configured as follows: `gridTemplate: 1fr 2fr
/ 3fr 4fr`, changing its first column to `3.5fr` will result in the
following style:
```
gridTemplateColumns: '3.5fr 4fr',
gridTemplateRows: '1fr 2fr'
```

If a grid has a shorthand with an axis being the default (a single
`auto` keyword), for example `gridTemplate: auto / 3fr 4fr`, the same
change as above will result in:
```
gridTemplateColumns: '3.5fr 4fr',
```

Fixes #6580
liady pushed a commit that referenced this issue Dec 13, 2024
…#6581)

**Problem:**

If a grid is configured with the `gridTemplate` shorthand, resizing the
grid does not handle that correctly.

**Fix:**

This PR handles `gridTemplate` shorthands during template changes via
the canvas.
**An incremental PR will do the same for the inspector template
editing**.

For example, if a grid is configured as follows: `gridTemplate: 1fr 2fr
/ 3fr 4fr`, changing its first column to `3.5fr` will result in the
following style:
```
gridTemplateColumns: '3.5fr 4fr',
gridTemplateRows: '1fr 2fr'
```

If a grid has a shorthand with an axis being the default (a single
`auto` keyword), for example `gridTemplate: auto / 3fr 4fr`, the same
change as above will result in:
```
gridTemplateColumns: '3.5fr 4fr',
```

Fixes #6580
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant