File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 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 }) {
9595 'min-height' : '1.5em' ,
9696 } ,
9797 } ,
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+ } ,
98109 {
99110 // In Safari on macOS date time inputs are 4px taller than normal inputs
100111 // 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