From the course: WordPress Content Blocks: Working with Themes

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Style variations

Style variations - WordPress Tutorial

From the course: WordPress Content Blocks: Working with Themes

Start my 1-month free trial

Style variations

- [Instructor] One sort of hidden feature in blocks are so-called style variations. You can see examples of this in the button blocks but there are other blocks that also have style variations bundled in. In this post, I've added three button blocks with three different style variations. Here's how this feature works. Once a button block is added, a styles panel becomes available in the block properties panel. And from here we can select one of three pre-configured style variations rounded, outlined, and squared. These style variations are also available directly from inside the block itself. If you go to the block toolbar you can select this change block type button. And from here you can see the style variations and if you hover over them you get a preview of what that content will look like with this style variation. Jumping to the front end, we see what those style variations look like to the visitor. And we can also inspect the output code to see what's actually happening here…

Contents