So I am styling a dropzone for a site. When a user drops an image, I want there to be a box-shadow on the preview element. If it is not an image I do not want the box shadow. The styling for the preview element in the css file looks like this:
.dropzone .dz-preview,
.dropzone-previews .dz-preview {
background: transparent;
position: relative;
display: inline-block;
margin: 40px;
vertical-align: top;
border: 1px solid transparent;
padding: 10px 13px 10px 10px;
}
In my JS (inline) I already have a function set that will emit a certain thumbnail if the file is NOT an image:
mydropzone.on("addedfile", function(file) {
if (!file.type.match(/image.*/)) {
mydropzone.emit("thumbnail", file, "http://i.local.dev:5000/jLNutaV.png");
}
});
I was thinking I could just do an else and set the box shadow, but I don't know how to set style for elements like the one in my CSS where several classnames are used. I just want this to be added to the CSS:
-webkit-box-shadow: 1px 1px 4px rgba(0,0,0,0.16);
box-shadow: 1px 1px 4px rgba(0,0,0,0.16);
Thanks