File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change 20
20
border : none ;
21
21
}
22
22
23
+ .mat-mdc-form-field-input-control {
24
+ // Due to the native input masking these inputs can be slightly taller than
25
+ // the plain text inputs. We normalize it by resetting the line height.
26
+ & [type = ' date' ],
27
+ & [type = ' datetime' ],
28
+ & [type = ' datetime-local' ],
29
+ & [type = ' month' ],
30
+ & [type = ' week' ],
31
+ & [type = ' time' ] {
32
+ line-height : 1 ;
33
+ }
34
+
35
+ // Reduce the size of the native buttons in a date/time input,
36
+ // because they can increase the height of the input (see #13317).
37
+ & ::-webkit-inner-spin-button ,
38
+ & ::-webkit-calendar-picker-indicator ,
39
+ & ::-webkit-clear-button {
40
+ font-size : 0.75em ;
41
+ }
42
+
43
+ // Native datetime inputs have an element in the shadow DOM that makes them taller than
44
+ // other inputs. These changes reset the user agent styles to make them consistent.
45
+ // via https://8yd.no/article/date-input-height-in-safari
46
+ & ::-webkit-datetime-edit {
47
+ line-height : 1 ;
48
+ padding : 0 ;
49
+ margin-bottom : -2px ;
50
+ }
51
+ }
52
+
23
53
.mat-mdc-form-field .mat-mdc-floating-label.mdc-floating-label {
24
54
// In order to ensure proper alignment of the floating label, we reset its line-height.
25
55
// The line-height is not important as the element is absolutely positioned and only has one
You can’t perform that action at this time.
0 commit comments