Skip to content

mc_nuke_all_styles option should also nuke flick.css #183

@jerclarke

Description

@jerclarke

Describe the bug

The recent reorganization of script and style enqueues seems to have missed a spot:

From mailchimp_sf_load_resources in mailchimp.php

	// Datepicker theme
	wp_enqueue_style( 'flick', MCSF_URL . 'assets/css/flick/flick.css', array(), MCSF_VER );

	// CSS
	if ( get_option( 'mc_nuke_all_styles' ) !== '1' ) {
		wp_enqueue_style( 'mailchimp_sf_main_css', MCSF_URL . 'assets/css/frontend.css', array(), MCSF_VER );

		// Backwards compatibility. TODO: Remove this in a future version.
		if ( get_option( 'mc_custom_style' ) === 'on' ) {
			$custom_css = mailchimp_sf_custom_style_css();
			wp_add_inline_style( 'mailchimp_sf_main_css', $custom_css );
		}
	}

In our case, this flick.css file is ruining styles used in our site, even though we have the mc_nuke_all_styles option enabled:

Image

I understand maybe it's needed for the datepicker, but I think it's fair to ask that there be some option to ensure absolutely no CSS is loaded on the front end of the site, and mc_nuke_all_styles seems like the obvious choice, since it's a CSS file after all.

Related: Are you planning to remove the mc_nuke_all_styles option? Please don't!

I noticed that if I unticked the box, the whole form field disappeared from the settings. When I looked at the field in setup-page.php, it seemed to be intentional.

If you're considering removing this, please leave it in place. Complex sites like ours will take the time to style the form according to our own style needs, and having styles like this that change over time is a big annoyance.

Steps to Reproduce

  • Have Remove CSS setting enabled
  • Load any page of your site
  • See that flick.css is enqueued regardless.

Screenshots, screen recording, code snippet

No response

Environment information

Latest versions of WP and plugin, this doesn't seem environment related based on the PHP.

WordPress information

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:bugSomething isn't working.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions