• So if I have two colums and I want to have a background color in the first one I can do something like this in my child theme css (top-cols is a custom class).

    .top-cols .wp-block-column:first-child {background-color: rgba(8,75,151, 0.7);}

    But this color will not be visible in the editor, so it doesn’t look godd for the user when he is editing the page.

    So I add something like this in the the functions.php to add my editor styles.

    function is_css(){
    add_theme_support( ‘editor-styles’ );
    add_editor_style( ‘style.css’ );
    }
    add_action( ‘after_setup_theme’, ‘is_css’ );

    This doesn’t help (no background-color). I can see some other changes adopted from my childtheme css (the font-color changed), but other gutenberg stuff doesn’t look right anymore.

    So to make a true wysiwyg editor experince for the user….what’s the correct way to do this?

    ?ystein

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘View custom css class changes in editor’ is closed to new replies.