File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77
88## [ Unreleased]
99
10- - Nothing yet!
10+ ### Fixed
11+
12+ - Fix date time bottom spacing on MacOS Safari ([ #146 ] ( https://github.com/tailwindlabs/tailwindcss-forms/pull/146 ) )
1113
1214## [ 0.5.5] - 2023-08-22
1315
Original file line number Diff line number Diff line change @@ -106,6 +106,17 @@ const forms = plugin.withOptions(function (options = { strategy: undefined }) {
106106 'text-align' : 'inherit' ,
107107 } ,
108108 } ,
109+ {
110+ // In Safari on macOS date time inputs that are set to `display: block` have unexpected
111+ // extra bottom spacing. This can be corrected by setting the `::-webkit-datetime-edit`
112+ // pseudo-element to `display: inline-flex`, instead of the browser default of
113+ // `display: inline-block`.
114+ base : [ '::-webkit-datetime-edit' ] ,
115+ class : [ '.form-input::-webkit-datetime-edit' ] ,
116+ styles : {
117+ display : 'inline-flex' ,
118+ } ,
119+ } ,
109120 {
110121 // In Safari on macOS date time inputs are 4px taller than normal inputs
111122 // 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