Automattic / _s

Hi. I'm a starter theme called _s, or underscores, if you like. I'm a theme meant for hacking so don't use me as a Parent Theme. Instead try turning me into the next, most awesome, WordPress theme out there. That's what I'm here for.
http://underscores.me/
GNU General Public License v2.0
10.92k stars 3.12k forks source link

Gutenberg Editor CSS Problems #1544

Open cengizilhan opened 1 year ago

cengizilhan commented 1 year ago

I am using Underscores theme. When I use the Gutenberg editor plugin the CSS's are not showing up and looking bad when viewing the page.

I tried some methods but it didn't work. Anyone know the solution? Untitled

able2create commented 7 months ago

Hi,

if there are no Theme Support scripts in the functions.php they can´t handle it.

For Example:

function mytheme_add_theme_support() {
    // Add support for block styles
    add_theme_support('wp-block-styles');

    // Add support for full and wide align images
    add_theme_support('align-wide');

    // Add support for editor styles
    add_theme_support('editor-styles');

    // Enqueue editor styles
    add_editor_style('style-editor.css');

    // Add support for responsive embedded content
    add_theme_support('responsive-embeds');

    // Add support for custom color palette
    add_theme_support('editor-color-palette', array(
        array(
            'name' => __('strong magenta', 'themeLangDomain'),
            'slug' => 'strong-magenta',
            'color' => '#a156b4',
        ),
        // ... more colors ...
    ));

    // Add theme support for font sizes
    add_theme_support('editor-font-sizes', array(
        array(
            'name' => __('small', 'themeLangDomain'),
            'size' => 12,
            'slug' => 'small'
        ),
        // ... more sizes ...
    ));
}
add_action('after_setup_theme', 'mytheme_add_theme_support');