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

Add a class for "white-space: normal" ? #3925

Open
leolivier opened this issue Oct 26, 2024 · 0 comments
Open

Add a class for "white-space: normal" ? #3925

leolivier opened this issue Oct 26, 2024 · 0 comments

Comments

@leolivier
Copy link

leolivier commented Oct 26, 2024

Overview of the problem

This is about Bulma 1.0.1

Inside a grid, I have some html code like this:

<div class="cell has-text-centered">
        <a class="button is-dark has-text-wrap" href="/members/xxx/">
          <figure class="image mini-avatar mr-2">
            <img class="is-rounded" src="/media/avatars/an_avatar.jpg">
          </figure>
          <strong>A Quite Long Name</strong>
        </a>
      </div>

When the name in the markers is long, it can expand outside of the cell. But, as there is a mini photo just besides, it could be displayed as multiline.

I looked at different solutions with the help of Claude Sonnet 3.5:

  • add 'is-multiline' class to the "button" : no effect at all
  • add "is-flex-wrap-wrap" class to the button: the line break is after the photo, the text is left unwrapped
  • add "has-text-wrap" class to the button: no effect
  • add "white-space: normal" style to the button, and then it works!

So I tried to find how to express that with Bulma, but I didn't find any way...
I finally created my own CSS class:

.button-wrap {
  white-space: normal !important
}
Wouldn't i be worth having this as a supported Bulma class?
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

2 participants
@leolivier and others