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

How to increase Width #79

Open
waelbenmustapha opened this issue Aug 21, 2021 · 3 comments
Open

How to increase Width #79

waelbenmustapha opened this issue Aug 21, 2021 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@waelbenmustapha
Copy link

Hi , im new to angular and im really not sure if this could be achieved from angular material or if you can add a feature wich allows width modification . i tried everything but couldn't increase the width ,

@RHeynsZa
Copy link

mat-form-field {
  width: 100%;
}

Add that to your styles.scss

Note it influences every mat form field in your app. Idk if its the right way, but I couldn't find a way to to it otherwise

@AnthonyNahas AnthonyNahas self-assigned this Sep 3, 2021
@AnthonyNahas AnthonyNahas added the enhancement New feature or request label Sep 3, 2021
@simionrobert
Copy link

simionrobert commented Sep 10, 2021

Try adding this to the component in cause.

::ng-deep mat-form-field {
  width: 100%;
}

Note: Didn't work with RHeynZa solution but it worked with this one for me.

@felixmoroni
Copy link

Add this to your global css file

mat-select-country .mat-form-field {
  width: 100%;
}

It will only apply to mat-form-field nested in mat-select-country.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants