How to Move Block-Level Styles to Classes in GenerateBlocks

As you start using the new class system in GenerateBlocks, you might encounter sections you created before the system existed or find yourself accidentally styling elements at the block level instead of …

Published:

Filed Under:

General

Kyle Van Deusen

The Admin Bar

After spending 15 years as a graphic designer and earning a business degree, I launched my agency, OGAL Web Design, in 2017. A year later, after finding the amazing community around WordPress, I co-found The Admin Bar, which has grown to become the #1 community for WordPress professionals. I'm a husband and proud father of three, and a resident of the Commonwealth of Virginia.

Fixed

This content contains affiliate links. View our affiliate disclaimer.

As you start using the new class system in GenerateBlocks, you might encounter sections you created before the system existed or find yourself accidentally styling elements at the block level instead of using classes. Thankfully, GenerateBlocks has a built-in system that makes it easy to transfer block-level styles into classes, allowing you to reuse those styles across your entire website.

In this post, I’ll walk you through how to move block-level styles into classes step by step.

Youtube video

The Problem with Block-Level Styles

When you style elements at the block level, those styles are tied to that specific block. This makes it difficult to reuse the same styles elsewhere on your site. By moving these styles into a class, you can apply them to multiple elements and make global updates with ease.

Demo Setup

For this demo, I’ve set up a container with an inner container.

Block-Level Styles Applied

  • Inner Container:
    • Background color.
    • Border radius.
    • Padding.
  • Headline: Styled individually at the block level.
  • Button: Styled individually at the block level.

The goal is to move these block-level styles into classes so they can be reused across the site.

Moving Styles to a Class

Step 1: Create a Class for the Container

  1. Select the container.
  2. Scroll to the top of the settings panel and add a class name (e.g., CTA-wrapper).
  3. Click Create.

When you create a class, you’ll see four options:

  • Empty Style: Start with a blank class.
  • Clone Existing Style: Copy styles from another class.
  • Copy Block Styles: Copy styles from the block to the class (styles remain on both).
  • Move Block Styles: Move styles from the block to the class (styles are removed from the block).

Since we want to transfer the styles entirely to the class, select Move Block Styles and click Start Editing.

Step 2: Verify the Styles in the Class

Once the styles are moved, you’ll be editing the CTA-wrapper class.

  • Backgrounds: The background color is now part of the class.
  • Spacing: Padding values have been transferred.
  • Borders: The border radius is included.

If you check the block-level settings, you’ll see indicators showing that these properties are now controlled by the global style. The original values are no longer at the block level.

Repeating the Process for Other Elements

Headline

  1. Select the headline.
  2. Add a class name (e.g., CTA-heading) and click Create.
  3. Choose Move Block Styles to transfer the styles to the class.

Button

  1. Select the button.
  2. Add a class name (e.g., CTA-button) and click Create.
  3. Choose Move Block Styles to transfer the styles to the class.

The button’s styles, including padding, background colors, and hover states, are now part of the CTA-button class.

Why This System Is Useful

This system is incredibly intuitive and solves a common problem: updating older designs or fixing elements styled at the block level.

By moving styles into classes, you can:

  • Reuse styles across your site.
  • Make global updates quickly.
  • Maintain a more organized and scalable design system.

Final Thoughts

Whether you’re updating sections created before the class system or correcting block-level styling habits, GenerateBlocks makes it easy to switch everything over to a class-based system.

This feature is a game-changer for improving your workflow and ensuring consistency across your site. If you haven’t started using classes in GenerateBlocks yet, now is the perfect time to dive in and take advantage of this powerful system.

Kyle Van Deusen

The Admin Bar

After spending 15 years as a graphic designer and earning a business degree, I launched my agency, OGAL Web Design, in 2017. A year later, after finding the amazing community around WordPress, I co-found The Admin Bar, which has grown to become the #1 community for WordPress professionals. I'm a husband and proud father of three, and a resident of the Commonwealth of Virginia.

Come Join Us!

Join the #1 WordPress Community and dive into conversations covering every aspect of running an agency!

Kyle Van Deusen

Community Manager

Latest Events

July 27th

The $30,000 Mistake Hiding in Your Cookie Banner

A Live CIPA Training for WordPress Agencies, with Termageddon's Hans Skillrud

July 16, 2026

You Don’t Have to Leave WordPress to Work With AI

AI and WordPress don't have to be at odds. See how InstaWP's MCP connects WordPress to the AI tools you're already using — live demo, real Q&A, and a real answer to the security question.

June 18th, 2026

WP Umbrella’s Biggest Evolution Yet

Join Aurelio Volle for a live walkthrough of WP Umbrella V3 — new dashboard, bulk views, backup engine, and more. June 18th at 12:30pm Eastern.
Tpdc onblue

Learn a proven discovery framework to transform casual leads into high-paying clients.

View the Course
The Friday Chaser

Wash down the week with the best of The Admin Bar! News, tips, and the best conversations delivered straight to your inbox every Friday!

More Articles

Screenshot of The Admin Bar website showing SEO and accessibility features.

How to Rank in AI Overviews (So Clients Stop Asking Why They’re Missing)

Got clients asking why they’re not showing up in AI search? This guide is for you. Learn how to get your client’s content ranking in ai overviews in 10 steps.

Pat Williams smiling and pointing at the camera in a professional photo.

Member Spotlight: Pat Williams

Pat has been building websites since the days of FrontPage and Dreamweaver, but what really stood …

Illustration of a photo icon with a yellow background and black border.

The Best Stock Photo Sources for Web Agencies

WordPress agency owners share where they actually get their images — and why the best answer is increasingly “not stock photos at all.”