jqueryplupload

Plupload: how to remove yellow highlight on delete event


I'm using plupload plugin to create drag and drop form. I changed css to make plupload form look like form from my design. When i click on "delete" btn - thumbnail gets highlighted with yellow color. This is standart behavior of plupload plugin. How can i change this color?

It seems that yellow color is not created by css class. Its created with a js function (if i understand correctly). I tried to look inside plugins code to change this behavior, but can find right spot.


Solution

  • Plupload uses JS to apply inline styles directly on the .plupload_file element upon delete. From my observation, it applies the inline styles background-image:none; background-color: rgb(xxx, yyy, zzz); opacity: 0.xxx; (where x,y,z values change dynamically until the element is removed from the DOM)

    To override these styles, the simplest option is to utilize the CSS !important rule. For example, given the following HTML:

    <div class="myDiv" style="background-color: red;">
        The inline styles for this div should make it red.
    </div>
    

    We can fight that with this:

    .myDiv {
       background-color: yellow !important;
    }
    

    https://css-tricks.com/override-inline-styles-with-css/

    The less graceful option would be combing through the source code to find where the yellow highlight is being applied, and modifying it.