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

Fixed grid breakpoint are relative to container instead of viewport #3879

Open
pedrokost opened this issue Aug 10, 2024 · 0 comments
Open

Fixed grid breakpoint are relative to container instead of viewport #3879

pedrokost opened this issue Aug 10, 2024 · 0 comments

Comments

@pedrokost
Copy link

This is a bug about Bulma.

Overview of the problem

This is about the Bulma CSS framework
I'm using Bulma version 1.0.0
My browser is: Google Chrome

Description

The Fixed Grid supports setting different size depending on breakpoints.

The breakpoints are called mobile, table, desktop, etc

However, the breakpoints size actually refers to the CONTAINER size! So if you have a 2 column layout, the breakpoints will refer to the column width instead of the window width.

It is quite confusing that terms like mobile/table/desktop/etc refer to the parent container width, instead of the window width.

Steps to Reproduce

<div class="container-fluid">
  <div class="columns is-tablet">
    <section class="column is-6 ">
      <div class="fixed-grid has-3-cols-mobile has-4-cols-tablet has-5-cols-desktop has-6-cols-widescreen has-7-cols-fullhd">
        <ol class="grid is-gap-1">
          <li class="cell">
            This is my cell
          </li>
          <li class="cell">
            This is my cell
          </li>
          <li class="cell">
            This is my cell
          </li>
          <li class="cell">
            This is my cell
          </li>
          <li class="cell">
            This is my cell
          </li>
        </ol>
      </div>
    </section>
    <section class="column is-6">
      <div class="fixed-grid has-3-cols-mobile has-4-cols-tablet has-5-cols-desktop has-6-cols-widescreen has-7-cols-fullhd">
        <ol class="grid is-gap-1">
          <li class="cell">
            This is my cell
          </li>
          <li class="cell">
            This is my cell
          </li>
          <li class="cell">
            This is my cell
          </li>
          <li class="cell">
            This is my cell
          </li>
          <li class="cell">
            This is my cell
          </li>
        </ol>
      </div>
    </section>
  </div>
</div>

Expected behavior

I would expect that has-3-cols-mobile and has-4-cols-tablet are relative to the window size, not the column size.

Actual behavior

Those classes should be relative to the window size. Alternatively, provide alternative names that don't imply window size.

Please note I am only learning Bulma. If I have missed an option, please let me know.

image

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

No branches or pull requests

1 participant