material-components / material-components/material-web

md-list-item overflows md-list

Open
#5,119 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
SCSS
Stars
11.3k
Forks
1.1k
Avg merge
20h 28m
Merged PRs (30d)
13

Description

What is affected?

Component

Description

The md-list-item overflows its parent container if the headline is too long and does not allow any wrapping, e.g. a long filename. I've provided a Stackblitz below that shows the bug as well as a proposed solution.

Reproduction

https://stackblitz.com/edit/node-yffcqy?file=index.js

Workaround

The headline behaves correctly when adding the display: block property to the md-list-item.
If you could add me as a contributor, I can create a pull request for this bug.

Is this a regression?

No or unsure. This never worked, or I haven't tried before.

Affected versions

current release & pre-releases

Browser/OS/Node environment

Chrome, Edge, Safari, Firefox, Chrome Mobile, Safari Mobile

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked StackBlitz reproduction in index.js and confirm how a long md-list-item headline overflows its parent. Inspect the component's styling for the headline and verify that the proposed display: block workaround makes long filenames wrap without overflow across the reported environments.

Written by the indexing model from the issue text.

Assessment

Tech stack
scss
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.