Skip to content

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

Description

@raphaelquast

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

  • I'm using sphinx-design 0.5.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions