Title: CSS doesn&#8217;t load without dashicons css
Last modified: April 23, 2019

---

# CSS doesn’t load without dashicons css

 *  Resolved [ockhamdesign](https://wordpress.org/support/users/ockhamdesign/)
 * (@ockhamdesign)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/css-doesnt-load-without-dashicons-css/)
 * Is there a reason why Ninja Forms is dependent on dashicons.css?
 * I deregistered the dashicons.css except in the admin to speed up pageload. The
   side effect of that is that the CSS of Ninja Forms doesn’t load.
 * Here’s the function.php that breaks Ninja Forms:
 * add_action( ‘wp_enqueue_scripts’, ‘dequeue_css’ );
    function dequeue_css() {
 * if ( ! is_user_logged_in() ) {
    wp_deregister_style( ‘dashicons’ ); } }
 * If you look at the page linked. You’ll see the Ninja Forms honeypot below the
   submit button.
    -  This topic was modified 7 years, 1 month ago by [ockhamdesign](https://wordpress.org/support/users/ockhamdesign/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcss-doesnt-load-without-dashicons-css%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Author [krmoorhouse](https://wordpress.org/support/users/krmoorhouse/)
 * (@krmoorhouse)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/css-doesnt-load-without-dashicons-css/#post-11464555)
 * [@ockhamdesign](https://wordpress.org/support/users/ockhamdesign/)
 * Hey,
 * Some of the styling that can be applied through the form builder introduce elements
   that are reliant on dashicons to function. So, our structural styles have dashicons
   as a dependency.
 * Ideally, we would prefer to only require that dependency in cases when we can
   detect that it is necessary, but that’s a future solution. At the moment, we’ve
   chosen to err on the side of caution.
 * If you’d like to manually enqueue our stylesheet in the same function that you’ve
   used to remove dashicons, you should be able to do so with the following:
 * wp_enqueue_style( ‘nf-display’, Ninja_Forms::$url . ‘assets/css/display-structure.
   css’ );
 * -KR

Viewing 1 replies (of 1 total)

The topic ‘CSS doesn’t load without dashicons css’ is closed to new replies.

 * ![](https://ps.w.org/ninja-forms/assets/icon-256x256.png?rev=1649747)
 * [Ninja Forms - The Contact Form Builder That Grows With You](https://wordpress.org/plugins/ninja-forms/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ninja-forms/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ninja-forms/)
 * [Active Topics](https://wordpress.org/support/plugin/ninja-forms/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ninja-forms/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ninja-forms/reviews/)

## Tags

 * [css](https://wordpress.org/support/topic-tag/css/)
 * [dashicons](https://wordpress.org/support/topic-tag/dashicons/)

 * 1 reply
 * 2 participants
 * Last reply from: [krmoorhouse](https://wordpress.org/support/users/krmoorhouse/)
 * Last activity: [7 years, 1 month ago](https://wordpress.org/support/topic/css-doesnt-load-without-dashicons-css/#post-11464555)
 * Status: resolved