• Resolved wpwebdevj

    (@wpwebdevj)


    I made a test page with some of your blocks (Review, Social Share, Expand, Button). I noticed that dashicons.min.css is being loaded on the front end of that page even though it doesn’t seem to be required for any of the blocks I am using. When I block dashicons.min.css in Chrome dev tools and refresh the page it looks exactly the same.

    This file dashicons.min.css is not loading on any of the other pages on my site, only the page with your blocks, even though it’s not required and doesn’t affect the output of the page at all.

    Is there any way to stop it from loading? What is the purpose of it?

    Other than this, your plugin seems really well coded. I like the use of inline SVG and the fact that no additional resources are loaded on pages without your blocks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Alexis Pandaan

    (@alexius08)

    Hi @wpwebdevj! Thanks for letting us know. We used the Dashicon CSS to render some Dashicon icons in the frontend. However, it turned out that we’re already using SVG to render those icons instead, and the CSS file no longer has any use.

    Currently, only the content toggle imports it. In our upcoming update, we’ll no longer load the Dashicon CSS when any block from our plugin is loaded. If you urgently need to prevent the Dashicon CSS from being loaded on the frontend, you could do the following:

    1. Save this file under the filename of block.php
    2. Navigate to your WordPress plugins folder and get to the folder for Ultimate Blocks. Afterwards, open src/blocks/content-toggle.
    3. You’ll see another file that also has the filename of block.php. Make sure to rename it first to something else (so that we still have the original copy in case the new one fails to work).
    4. Copy the block.php file that you just downloaded into the folder.

    Please let us know how it goes.

    Thread Starter wpwebdevj

    (@wpwebdevj)

    Hi, thanks for the quick response!

    I was able to remove dashicons.css by adding this code to my child theme functions.php file.

    function garbageremoval() {
    	wp_dequeue_style('dashicons');
    }
    add_action('wp_enqueue_scripts', 'garbageremoval', 100);
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘dashicons.min.css’ is closed to new replies.