-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(select): aligned select underline, placeholder and text with input
- added ellipsis to select placeholder - aligned floating placeholder with input - support font-size fixes #2124
- Loading branch information
1 parent
8d0cd04
commit 12c910e
Showing
9 changed files
with
121 additions
and
129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// These styles are used by input-style components | ||
// including md-input-container and md-select | ||
|
||
@import './variables'; | ||
|
||
$mat-input-wrapper-spacing: 1em !default; | ||
$mat-input-floating-placeholder-scale-factor: 0.75 !default; | ||
$mat-input-hint-min-space: 10px !default; | ||
|
||
// Applies a floating placeholder above the input itself. | ||
@mixin mat-input-placeholder-floating($translateY) { | ||
display: block; | ||
transform: translateY($translateY) scale($mat-input-floating-placeholder-scale-factor); | ||
width: 100% / $mat-input-floating-placeholder-scale-factor; | ||
} | ||
|
||
@mixin mat-input-base { | ||
display: inline-block; | ||
position: relative; | ||
font-family: $mat-font-family; | ||
line-height: normal; | ||
outline: none; | ||
vertical-align: middle; | ||
|
||
// To avoid problems with text-align. | ||
text-align: left; | ||
|
||
[dir='rtl'] & { | ||
text-align: right; | ||
} | ||
} | ||
|
||
// Global wrapper. We need to apply margin to the element for spacing, but | ||
// cannot apply it to the host element directly. | ||
.mat-input-wrapper { | ||
margin: $mat-input-wrapper-spacing 0; | ||
// Account for the underline which has 4px of margin + 2px of border. | ||
padding-bottom: 6px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.