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

Select should adjust height when font-size changes #2127

Closed
kara opened this issue Dec 9, 2016 · 10 comments
Closed

Select should adjust height when font-size changes #2127

kara opened this issue Dec 9, 2016 · 10 comments
Labels
P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Comments

@kara
Copy link
Contributor

kara commented Dec 9, 2016

Currently when you change the font size of the select to override the default font size, the placeholder doesn't adjust to make space for a larger font. Md-input does do this, so select should as well.

@kara kara self-assigned this Dec 9, 2016
@jelbourn jelbourn added the P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent label Dec 9, 2016
@renevall
Copy link

Just for reference Kara, I put a md-select after a md-input, and it overlaps without changing the font size.

<div>
      <md-input-container>
        <input md-input type="text" name="name" placeholder="Full name" formControlName="name">
      </md-input-container>
    </div>
    <div>
      <md-select placeholder="Company Name" formControlName="company">
        <md-option *ngFor="let company of companies" [value]="company.value">{{ company.viewValue}}</md-option>
      </md-select>
    </div>

@villaratio
Copy link

villaratio commented Feb 24, 2017

I had the same issue.
I was able to workaround it by applying the following style (which basically remove the hard-coded values)

:host /deep/ .mat-select-trigger {
    font-size: inherit;
    height: inherit;
}

:host /deep/ .mat-select-value-text {
    line-height: inherit;
}

@hblieb
Copy link

hblieb commented Apr 3, 2017

@P-Jan work around partly worked for me. I only needed the

:host /deep/ .mat-select-trigger {
    font-size: inherit;
}

And I added

.mat-select {
    padding-top: 5px;  //makes the select's baseline align with neighboring text input
    margin-bottom: 14px //makes the text input below my select align with it's neighbor also
}

@javagaba
Copy link

javagaba commented Aug 3, 2017

Any news on this? This issue still seems to exist in the latest version...

@makdeniss
Copy link

I've fixed the alignment issue with this code:

.mat-select {
  margin-top: 14px;
}

You have to play with the margin-top value in your context. But that will align the input field and select field correctly with each other.

@richmwatts
Copy link

Still no fix for this?

@qstiegler
Copy link

Please fix this issue! Also the space between label and selected option is not the same than between label and text of an input field if you change the font-size.

@willshowell
Copy link
Contributor

AFAIK this will be fixed by #6488

@jelbourn
Copy link
Member

jelbourn commented May 9, 2018

Should be resolved with the existence of mat-form-field

@jelbourn jelbourn closed this as completed May 9, 2018
@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 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Projects
None yet
Development

No branches or pull requests