Is there a simple way to add classnames to individual core Gutenberg blocks?
Blocks is a great step toward moving to a web where HTML structurally/functionally describes elements, which are styled elsewhere in CSS. However, this is limited in that blocks cannot be easily classed?
I'd be happy with a plugin that extends existing (or custom) block functionality to include classes and ids.
Is there a simple way to add classnames to individual core Gutenberg blocks?
Blocks is a great step toward moving to a web where HTML structurally/functionally describes elements, which are styled elsewhere in CSS. However, this is limited in that blocks cannot be easily classed?
I'd be happy with a plugin that extends existing (or custom) block functionality to include classes and ids.
Share Improve this question asked Oct 4, 2018 at 20:36 Wes ModesWes Modes 2151 gold badge3 silver badges9 bronze badges 2- Possible duplicate of Add custom class to core blocks in Gutenberg – Jacob Peattie Commented Oct 5, 2018 at 1:15
- Not a duplicate. The referenced article asks how to add permanent classes to core blocks at the code level. I was asking how to add classes dynamically from the admin interface. – Wes Modes Commented Oct 6, 2018 at 2:43
1 Answer
Reset to default 1Every block has a field for custom CSS classes in the 'Advanced' panel: