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(form-field): remove 200px width since it messes up flex layouts #7083

Merged
merged 2 commits into from
Oct 12, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions src/lib/form-field/_form-field-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,6 @@
$underline-color-warn: mat-color($warn);
$underline-focused-color: mat-color($primary);

// Define the width here so that it is easier for users to override with one css class worth
// of specificity.
.mat-form-field {
width: 200px;
}

.mat-form-field-placeholder {
color: $placeholder-color;
}
Expand Down
5 changes: 5 additions & 0 deletions src/lib/form-field/form-field.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
$mat-form-field-hint-min-space: 1em !default;
// The height of the underline.
$mat-form-field-underline-height: 1px !default;
// Infix stretches to fit the container, but naturally wants to be this wide. We set this in order
// to have a a consistent natural size for the various types of controls that can go in a form
// field.
$mat-form-field-default-infix-width: 180px !default;


.mat-form-field {
Expand Down Expand Up @@ -60,6 +64,7 @@ $mat-form-field-underline-height: 1px !default;
position: relative;
flex: auto;
min-width: 0;
width: $mat-form-field-default-infix-width;
}

// Used to hide the placeholder overflow on IE, since IE doesn't take transform into account when
Expand Down