Skip to content
Merged
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
5 changes: 4 additions & 1 deletion src/lib/input/input-container.scss
Original file line number Diff line number Diff line change
Expand Up @@ -227,11 +227,14 @@ $mat-input-underline-disabled-background-image:
// Wrapper for the hints and error messages. Provides positioning and text size.
// Note that we're using `top` in order to allow for stacked children to flow downwards.
.mat-input-subscript-wrapper {
$line-height: 1.2em;

position: absolute;
font-size: 75%;
top: 100%;
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

overflow: hidden; // prevents multi-line errors from overlapping the input
}

Expand Down