Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bootstrap
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 263
    • Issues 263
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 114
    • Merge requests 114
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Bootstrap
  • bootstrap
  • Issues
  • #37922
Closed
Open
Issue created Jan 21, 2023 by Administrator@rootContributor3 of 3 checklist items completed3/3 checklist items

grid breaks for nested col with text-truncate on a long text

Created by: saranglakare

Prerequisites

  • I have searched for duplicate or closed issues
  • I have validated any HTML to avoid common problems
  • I have read the contributing guidelines

Describe the issue

For a layout like this:

  • row
    • col-auto
    • col
      • row
        • col w/ text-truncate

The two columns do not show side by side when the text is larger than the available width (that is, truncate comes into use).

How it displays: Screen Shot 2023-01-21 at 6 45 07 PM

Expected behaviour: Screen Shot 2023-01-21 at 6 45 13 PM

Why is this important? Two layered layouts are very common. Just adding text-truncate should not break the powerful grid layout Bootstrap has!

Reduced test cases

Sample code showing the problem: https://o1jjvb.stackblitz.io

Note that

  1. without nested col it works with truncate
  2. with nested col but without truncate it works

As it turns out, this code actually works only on v4.5.0 of Bootstrap! https://o1jjvb-o1zlws.stackblitz.io

On investigating the changes made around 4.5.0 I found that adding min-width:0 to .col is what solved the problem. Here is that one change showing a working version: https://o1jjvb-kchnnp.stackblitz.io

I traced why the min-width change was reverted and found these (adding here just for reference): https://github.com/twbs/bootstrap/pull/30999 https://github.com/twbs/bootstrap/issues/31094

So may be min-width:0 is the wrong way to fix it. Can anyone tell me how to fix it properly or can we get this fix into Bootstrap?

What operating system(s) are you seeing the problem on?

macOS

What browser(s) are you seeing the problem on?

Chrome

What version of Bootstrap are you using?

5.3

Assignee
Assign to
Time tracking