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 143143 // we need to divide by the scale factor to make it half of the original text size. We again need
144144 // to subtract off the line spacing since the mocks measure to the edge of the text, not the edge
145145 // 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 ) ;
147147 // The padding applied to the input-wrapper to reserve space for the subscript, since it's
148148 // absolutely positioned. This is a combination of the subscript's margin and line-height, but we
149149 // 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 ;
151151
152152 .mat-input-container {
153153 font-family : mat-font-family ($config );
193193 }
194194 }
195195
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+
196202 .mat-input-placeholder-wrapper {
197203 top : - $infix-margin-top ;
198204 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;
7777 border : none ;
7878 outline : none ;
7979 padding : 0 ;
80+ margin : 0 ;
8081 width : 100% ;
8182
8283 // Prevent textareas from being resized outside the container.
You can’t perform that action at this time.
0 commit comments