Site logo

Archived topic

line-height missing from Typography in Container in GenerateBlocks

3 replies · Started by Natalie on May 13, 2020

Viewing posts 1–4 of 4

The headline block has a 'line height' option in the advanced typography section.

The container block doesn't have a 'line height' option in the advanced typography section.

Is this by design?

My issue is that I'm trying to style a bulleted list, which by default in Wordpress has very few styling options.

I have wrapped it in a container and was hoping to style the line-height in the container but it is not there.

Obviously the bulleted list can be styled by css for a default line-height, but this was to give the client the ability to override the line-height on a case by case basis.

Thanks

Hi there,

yes it is designed that way as any element with an inherited line height could be effected by that one setting - which could be problematic.

What type of list is it ? As you can replicate a basic list using the Headline Block

Hi David

Thanks

Not a specific list. I'm just writing the client documentation for their website and wanted to tell them how to vary the line-height in a bulleted list.

Wordpress is woeful with it's options on lists.

With the headline block, I assume you mean create a headline with an icon as the bullet symbol and then duplicate the block for each line of your bulleted list.

I did think of that but it is a bit fiddly for the client.

I think my best option, if they regularly need a different spacing is to add a new 'style' to the gutenberg default list using wp.blocks.registerBlockStyle( 'core/list'
with a class that I can style with css. Not as versatile but easier for the client.

Sounds like a solution :)

This archived topic is closed to new replies.