File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 143
143
// we need to divide by the scale factor to make it half of the original text size. We again need
144
144
// to subtract off the line spacing since the mocks measure to the edge of the text, not the edge
145
145
// of the line.
146
- $subscript-margin-top : 0.5em / $subscript-font-scale - $line-spacing ;
146
+ $subscript-margin-top : 0.5em / $subscript-font-scale - ( $line-spacing * 2 ) ;
147
147
// The padding applied to the input-wrapper to reserve space for the subscript, since it's
148
148
// absolutely positioned. This is a combination of the subscript's margin and line-height, but we
149
149
// need to multiply by the subscript font scale factor since the wrapper has a larger font size.
150
- $wrapper-padding-bottom : 0.5 em + ( $line-height * $subscript-font-scale ) ;
150
+ $wrapper-padding-bottom : ( $subscript-margin-top + $line-height ) * $subscript-font-scale ;
151
151
152
152
.mat-input-container {
153
153
font-family : mat-font-family ($config );
193
193
}
194
194
}
195
195
196
+ // <input> elements seem to have their height set slightly too large on Safari causing the text to
197
+ // be misaligned w.r.t. the placeholder. Adding this margin corrects it.
198
+ input .mat-input-element {
199
+ margin-top : - $line-spacing * 1em ;
200
+ }
201
+
196
202
.mat-input-placeholder-wrapper {
197
203
top : - $infix-margin-top ;
198
204
padding-top : $infix-margin-top ;
Original file line number Diff line number Diff line change @@ -77,6 +77,7 @@ $mat-input-underline-height: 1px !default;
77
77
border : none ;
78
78
outline : none ;
79
79
padding : 0 ;
80
+ margin : 0 ;
80
81
width : 100% ;
81
82
82
83
// Prevent textareas from being resized outside the container.
You can’t perform that action at this time.
0 commit comments