Skip to content
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

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

Merged
merged 1 commit into from
Jan 12, 2017

Conversation

crisbeto
Copy link
Member

@crisbeto crisbeto commented Jan 2, 2017

Prevents the input's suffix and prefix from stretching together with their parent node and leaving some weird spacing between themselves and the input. This was a side-effect of using display: table-cell.

Fixes #2493.
Fixes #1881.
Fixes #1421.

@crisbeto crisbeto added the has pr label Jan 2, 2017
@crisbeto crisbeto requested a review from jelbourn January 2, 2017 13:03
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Jan 2, 2017
@jelbourn jelbourn requested review from mmalerba and removed request for jelbourn January 3, 2017 17:16

// 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.

Prevents the input's suffix and prefix from stretching together with their parent node and leaving some weird spacing between themselves and the input. This was a side-effect of using `display: table-cell`.

Fixes angular#2493.
Fixes angular#1881.
Fixes angular#1421.
@mmalerba mmalerba added pr: lgtm action: merge The PR is ready for merge by the caretaker and removed pr: needs review labels Jan 11, 2017
@tinayuangao tinayuangao merged commit 64f6d1b into angular:master Jan 12, 2017
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement
Projects
None yet
4 participants