Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Block editor preview #119

Open
rosalynpoort opened this issue Jun 12, 2023 · 0 comments
Open

Block editor preview #119

rosalynpoort opened this issue Jun 12, 2023 · 0 comments

Comments

@rosalynpoort
Copy link

I have some custom styles for a frontend form, so I deregistered the acf stylesheets. This works for the front end, but the preview in admin shows the default styles because the stylesheets are in the admin for the editor fields. Is there a way to stop those styles from applying to .acf-block-preview?

Also, is there a way to override this function for the admin block preview? I don't want the button style in the preview to have the wordpress admin button styles.

/admin/forms/forms-preview.php
function add_classes_to_button( $attributes ) {
		if ( ! is_admin() ) {
			return $attributes;
		}

		$attributes['class'] .= ' button button-primary button-large';

		return $attributes;
	}

I can always override the styles with more specific css but just thought i would check if there was an easier way. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant