最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

css - Simple way to add custom class and ids to individual Gutenberg blocks

matteradmin11PV0评论

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
Add a comment  | 

1 Answer 1

Reset to default 1

Every block has a field for custom CSS classes in the 'Advanced' panel:

Post a comment

comment list (0)

  1. No comments so far