Skip to content

fix(input-container): prefix and suffix stretching together with parent #2496

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

Merged
merged 1 commit into from
Jan 12, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/lib/input/input-container.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,9 @@ md-input-container {
}
}
}

// Prevents the prefix and suffix from stretching together with the container.
.md-input-prefix, .md-input-suffix {
width: 0.1px;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this width needed?

Copy link
Member Author

@crisbeto crisbeto Jan 4, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It kind of acts as a max-width, otherwise the table cells stretch out.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, is there a reason we have to use table as opposed to flex? I had started a PR to convert it to flex at some point, but I don't know what happened to it...

Copy link
Member Author

@crisbeto crisbeto Jan 4, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure, IIRC @hansl implemented it like this initially, but I don't know what the reasoning was.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, Jeremy's comment on #2581 explains why we're avoiding flex here.

white-space: nowrap;
}