I have some code to set CSS of a input type of file. I create the box dynamically using JavaScript function like this:
/*
var newLabel = document.createElement('label');
newLabel.htmlFor='${id}File';
newLabel.className='upload-file-input';
${id}_control_group.append(newLabel);
*/
var newInput = document.createElement('input');
newInput.type = 'file';
newInput.name = 'myFile';
newInput.id = 'myFile';
newInput.accept="image/png, image/jpeg, image/gif";
newInput.className='upload-file-input'; //this is not working.
form_control_group.append(newInput);
This CSS is present in class no problem about that.