Skip to content

Block editor preview #119

@rosalynpoort

Description

@rosalynpoort

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions