File tree Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -196,27 +196,31 @@ const calendarDataUrl = `url("data:image/svg+xml;utf8,${encodeURIComponent(
196196// Fix placeholder text for date inputs in Safari: https://github.com/mui/material-ui/issues/37226
197197const safariEmptyDateBugFix = {
198198 '@supports (font: -apple-system-body) and (-webkit-appearance: none)' : {
199- '&:has(input[type="date"]):not([value] ), &:has(input[type="datetime-local"]):not([value] )' :
199+ '&:has(input[type="date"][value=""] ):not(:focus-within ), &:has(input[type="datetime-local"][value=""] ):not(:focus-within )' :
200200 {
201201 color : 'rgba(0,0,0,0)' ,
202202 position : 'relative' ,
203203 minWidth : 120 ,
204204 } ,
205- '&:has(input[type="date"]):not([value])::before' : {
205+
206+ '&:has(input[type="date"][value=""]):not(:focus-within)::before' : {
206207 content : '"dd / mm / yyyy"' ,
207208 left : 16 ,
208209 color : '#333' ,
209210 display : 'inline-block' ,
210211 position : 'absolute' ,
211212 } ,
212- '&:has(input[type="datetime-local"]):not([value])::before' : {
213- content : '"dd / mm / yyyy, --:--"' ,
214- left : 16 ,
215- color : '#333' ,
216- display : 'inline-block' ,
217- position : 'absolute' ,
218- } ,
219- '&:has(input[type="date"]):not([value])::after, &:has(input[type="datetime-local"]):not([value])::after' :
213+
214+ '&:has(input[type="datetime-local"][value=""]):not(:focus-within)::before' :
215+ {
216+ content : '"dd / mm / yyyy, --:--"' ,
217+ left : 16 ,
218+ color : '#333' ,
219+ display : 'inline-block' ,
220+ position : 'absolute' ,
221+ } ,
222+
223+ '&:has(input[type="date"])::after, &:has(input[type="datetime-local"])::after' :
220224 {
221225 content : '""' ,
222226 position : 'absolute' ,
You can’t perform that action at this time.
0 commit comments