Skip to content

Conversation

@crisbeto
Copy link
Member

Fixes the input container hints causing an overflow on the parent by a couple of pixels. Note that this can be fixed alternatively by setting line-height: 1 on the wrapper, however it causes multi-line hints to be a little too compact. I went with 1.2 since it seems to be the closest to the browser defaults for normal.

Fixes #4051.

Fixes the input container hints causing an overflow on the parent by a couple of pixels. Note that this can be fixed alternatively by setting `line-height: 1` on the wrapper, however it causes multi-line hints to be a little too compact. I went with 1.2 since it seems to be the closest to the browser defaults for `normal`.

Fixes angular#4051.
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Apr 15, 2017
width: 100%;
margin-top: -$mat-input-wrapper-spacing;
margin-top: -$line-height;
line-height: $line-height;
Copy link
Contributor

Choose a reason for hiding this comment

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

why not change the line-height on .mat-input-container from normal to 1.2em instead of overriding here?

Copy link
Member Author

Choose a reason for hiding this comment

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

I wanted to avoid breaking other parts of the input container since these changes are only relevant to the hints.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it should be ok, most browsers have normal = 1.2. Using 1.2 explicitly will make sure its consistent in all browsers

Copy link
Contributor

Choose a reason for hiding this comment

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

Since changing the one on the container causes other elements to overflow I'm fine with doing this

// cannot apply it to the host element directly.
.mat-input-wrapper {
margin: $mat-input-wrapper-spacing 0;
margin: 1em 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

why did you remove the constant?

Copy link
Member Author

Choose a reason for hiding this comment

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

After the changes I did below, it was only being used in one place which makes it pointless.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we often prefer constants even if they're only used once since they describe what the value is supposed to represent.

@mmalerba
Copy link
Contributor

LGTM

@crisbeto crisbeto added the action: merge The PR is ready for merge by the caretaker label Apr 17, 2017
@kara kara merged commit 0b9b582 into angular:master Apr 21, 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

Development

Successfully merging this pull request may close these issues.

MdHint causes MdTab to show scrollbar

4 participants