Skip to content

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

Merged
tinayuangao merged 1 commit into
angular:masterfrom
crisbeto:2493/prefix-stretching
Jan 12, 2017
Merged

tinayuangao merged 1 commit into
angular:masterfrom
crisbeto:2493/prefix-stretching

Conversation

@crisbeto

@crisbeto crisbeto commented Jan 2, 2017 •

Copy link
Copy Markdown
Member

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
Copy Markdown
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?

@crisbeto crisbeto Jan 4, 2017 •

Copy link
Copy Markdown
Member Author

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
Copy Markdown
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...

@crisbeto crisbeto Jan 4, 2017 •

Copy link
Copy Markdown
Member Author

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
Copy Markdown
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.
@crisbeto
crisbeto force-pushed the 2493/prefix-stretching branch from 3f1aa20 to c9de8fd Compare January 5, 2017 22:37
@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
Copy Markdown

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