I have a Mailchimp sign-up form with an <input>
element that has placeholder text. On Chrome, Firefox, and Microsoft Edge it displays fine but on Safari (desktop and mobile) the placeholder text does not show. It is blank. Code below:
<input type="email" placeholder="Enter your email" onfocus="this.placeholder='Enter your email'" name="EMAIL" id="mce-EMAIL" class="required email" required="" aria-required="true">
I used web-kit fixes to remove the background color from the autocomplete, have white text, and add text styles.
input:-webkit-autofill,
input:-webkit-autofill:active,
input:-webkit-autofill:focus,
input:-webkit-autofill:hover,
select:-webkit-autofill,
select:-webkit-autofill:active,
select:-webkit-autofill:focus,
select:-webkit-autofill:hover,
textarea:-webkit-autofill,
textarea:-webkit-autofill:active,
textarea:-webkit-autofill:focus,
textarea:-webkit-autofill:hover {
background-color: #ED3A38 !important;
transition: background-color 5000s ease-in-out 0s !important;
-webkit-text-fill-color: #FFFFFF !important;
font-size: 6vw !important;
}
As well as followed this guide to change the placeholder text colour and size:
input:-webkit-autofill::first-line,
input:-internal-autofill-previewed,
::-webkit-input-placeholder,
::-moz-placeholder,
:-ms-input-placeholder,
::-ms-input-placeholder,
:-moz-placeholder {
-webkit-text-fill-color: #FFFFFF !important;
font-size: 6vw !important;
letter-spacing: -0.057em;
}
::placeholder {
color: #FFFFFF !important;
opacity: 1 !important;
}
I'm stuck on why this isn't working. Is there something I am missing?
This is the live example in production: link