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

Gutenberg Editor CSS Problems #1544

Open
cengizilhan opened this issue Feb 18, 2023 · 1 comment
Open

Gutenberg Editor CSS Problems #1544

cengizilhan opened this issue Feb 18, 2023 · 1 comment

Comments

@cengizilhan
Copy link

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
Copy link

able2create commented Dec 5, 2023

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');

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

2 participants