• Resolved nifel

    (@nifel)


    Love your work with this plugin. But I had to customize it for myself to improve performance, so I just want to give you some tips.

    You’re using Font Awesome just for one element (delete button). So the user have to download an entire library just for one plugin and element, which is not great.

    My solution is that you delete the whole enqueue font-awesome script and instead use Unicode for the X. The final result will be exactly the same.

    Unicode instead of fontawesome <i>-element:
    <span class="delete-file" aria-hidden="true">❌</span>
    Unicode: & # x 2 7 4 C; (without space)

    You can easily change the CSS for it as well:

    .delete-file {
        color: transparent;
        text-shadow: 0 0 0 rgb(246, 98, 129);
        font-size: 12px;
    }
    • This topic was modified 7 years, 1 month ago by nifel.
    • This topic was modified 7 years, 1 month ago by nifel.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘Performance suggestion’ is closed to new replies.