Skip to content

bug(stepper): Whitespace on empty label #31655

@jonas-menne

Description

@jonas-menne

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

When creating a stepper without a label it still leaves space for a label resulting in a unnessecary trailing whitespace next to the number.

Image

I know there is a css workaround for this issue but imo it should look okay from the start.

Reproduction

StackBlitz link: https://stackblitz.com/edit/ay62zu8f?file=src%2Fexample%2Fstepper-overview-example.html
Steps to reproduce:

  1. Create a Stepper without a label

Expected Behavior

Theres a whitespace after the number.

Actual Behavior

A whitespace next to the numbers, resulting in a break of Line.

Environment

  • Angular: 20.1.0
  • CDK/Material: 20.1.0
  • Browser(s): Edge
  • Operating System (e.g. Windows, macOS, Ubuntu): Windows

Metadata

Metadata

Assignees

Labels

P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/stepper

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions