executablebooks / sphinx-design

A sphinx extension for designing beautiful, screen-size responsive web components.
https://sphinx-design.readthedocs.io/en/furo-theme/
MIT License
187 stars 57 forks source link

Using a single value for grid `:columns:` prevents grid from re-arranging items #182

Open raphaelquast opened 5 months ago

raphaelquast commented 5 months ago

Describe the bug

context

Not sure if this is considered a bug or not, but I thought I'll bring it up since it puzzled me for a moment...

If I use something like this:

.. grid:: 1 1 2 2

    .. grid-item::
        :columns: 8

        A

    .. grid-item::
        :columns: 4

        B

Then the grid does not re-arrange the items below each other for small screens but always keeps 2 items next to each other with the 8/4 size ratio (e.g. 1 1 2 2 seems to be ignored).

If I specify explicit columns for each level, it does the job nicely:

.. grid:: 1 1 2 2

    .. grid-item::
        :columns: 12 12 8 8

        A

    .. grid-item::
        :columns: 12 12 4 4

        B

expectation

I'd expect that the re-arrangement of items is still performed even if a single column-width is provided

... for the example above, I'd expect that on small-screens, the 2 items are shown below each other (however still with the size-ratio 8/4)

List your environment

welcome[bot] commented 5 months ago

Thanks for opening your first issue here! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.
If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).
Welcome to the EBP community! :tada: