Skip to content

md-input-container: mdPrefix and mdSuffix divs should not be present when there is no content #3659

Closed
@natsid

Description

@natsid

Proposal:

I'd like to propose adding an ngIf on both the .mat-input-prefix and .mat-input-suffix divs in the md-input-container template so that they are only in the DOM if the user has included a prefix/suffix.

What is the use-case or motivation for changing an existing behavior?

I'd like to be able to add space between the infix and the affixes, but only when an affix is present.

What is the current behavior?

Currently, if I add any sort of spacing there, the space shows up even without the affix, as seen in the second input here.

Metadata

Metadata

Assignees

Labels

P2The issue is important to a large percentage of users, with a workaround

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions