# Blocks support by themes

By default, blocks provide their styles to enable basic support for blocks in themes without any change. Themes can add/override these styles, or they can provide no styles at all, and rely fully on what the theme provides.

Some advanced block features require opt-in support in the theme itself as it's difficult for the block to provide these styles, they may require some architecting of the theme itself, in order to work well.

To opt-in for one of these features, we should call add_theme_support( 'gutenberg', $features ) in the functions.php file of the theme. For example:

function mytheme_setup_theme_supported_features() {
	add_theme_support( 'gutenberg', array(
		'wide-images' => true,
	) );

add_action( 'after_setup_theme', 'mytheme_setup_theme_supported_features' );

# Opt-in features

# Wide Images:

Some blocks such as the image block have the possibility to define a "wide" or "full" alignment by adding the corresponding classname to the block's wrapper ( alignwide or alignfull ). A theme can opt-in for this feature by calling:

add_theme_support( 'gutenberg', array(
   'wide-images' => true,
) );

# Colors:

Different blocks have the possibility of customizing colors. Gutenberg provides a default palette, but a theme can overwrite it and provide its own:

add_theme_support( 'gutenberg', array(
   'colors' => array(
) );

The colors will be shown in order on the palette, and there's no limit to how many can be specified.