File tree 1 file changed +11
-0
lines changed
1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -95,6 +95,17 @@ const forms = plugin.withOptions(function (options = { strategy: undefined }) {
95
95
'min-height' : '1.5em' ,
96
96
} ,
97
97
} ,
98
+ {
99
+ // In Safari on iOS date and time inputs are centered instead of left-aligned and can't be
100
+ // changed with `text-align` utilities on the input by default. Resetting this to `inherit`
101
+ // makes them left-aligned by default and makes it possible to override the alignment with
102
+ // utility classes without using an arbitrary variant to target the pseudo-elements.
103
+ base : [ '::-webkit-date-and-time-value' ] ,
104
+ class : [ '.form-input::-webkit-date-and-time-value' ] ,
105
+ styles : {
106
+ 'text-align' : 'inherit' ,
107
+ } ,
108
+ } ,
98
109
{
99
110
// In Safari on macOS date time inputs are 4px taller than normal inputs
100
111
// This is because there is extra padding on the datetime-edit and datetime-edit-{part}-field pseudo elements
You can’t perform that action at this time.
0 commit comments