I am using react-bootstrap for styling my elements and I do not achieve to change the focus color of my input type file. It keeps showing the default blueish border when focus. I have tried several things like targeting input[type="file"]:focus on css and similar stuff, all of them without success.
My form field looks as follows, note I use Formik, that is why you see functions as setFieldValue:
<Form.File id="imageToUpload" name="imageToUpload" type="file" custom onBlur={handleBlur}>
<Form.File.Input
accept=".jpg, .jpeg, .png"
onChange={e => {
setFieldTouched('image', true);
setFieldValue('image', e.currentTarget.files[0]);
setFilename(e.currentTarget.files[0].name);
}}
isInvalid={touched.image === true && errors.image !== undefined}
isValid={touched.image === true && errors.image === undefined}
/>
<Form.File.Label data-browse={t('common-image-selector-button-text')}>
{filename}
</Form.File.Label>
</Form.File>
It is interesting that in my css I have the following:
.form-control:focus{
border-color: #a3c4bc;
box-shadow: 0 0 0 0.1rem #8ebdb1;
}
And this works for the rest of the form fields. Only with file types do not work.
Any suggestion would be appreciated. Thank you in advance and regards.