getgrav / getgrav/grav-plugin-shortcode-core
Columns Shortcode doesn't accept `auto` for column count
- Dominant language
- PHP
- Stars
- 47
- Forks
- 17
- PR merge metrics
- No merged PRs in 30d
Description
**Steps to reproduce:**
Try to set the column count to `auto` using the shortcode parameter `count`:
`[columns count=auto] [/columns]`
**Expected results:**
The resulting CSS style should have a column count of `auto`.
**Actual results:**
The resulting CSS style has a column count of `0`.
**More details:**
Currently, the `count` parameter of the Columns shortcode is of type number, and is cast to an integer when generating the CSS style. However, `auto` is a valid value for the column count in the `columns` and `column-count` CSS properties (see [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/columns#formal_syntax)).
I suggest that the shortcode parameter should accept the `auto` value as well. It provides a simple way to add some reactivity to the columns element by having the column number dynamically determined given the set column with, resulting in more columns on a wider viewport.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.