Title: Block API &#8211; adding styles
Last modified: March 27, 2024

---

# Block API – adding styles

 *  [PaulH](https://wordpress.org/support/users/paulhuckstepp/)
 * (@paulhuckstepp)
 * [2 years ago](https://wordpress.org/support/topic/block-api-adding-styles/)
 * I’m creating a custom block using the Pods Block API and I’ve got everything 
   working how I want it. However, I’m unsure how to assign styles to the block 
   when editing in the editor and also on the frontend.
 * I’ve previously used ACF and Carbon Fields, both of which have options in the
   block definitions to assign stylesheets to use for the editor and frontend.
 * I cannot find anything in the docs for Pods that tell me how to do that. Can 
   you help?

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [Scott Kingsley Clark](https://wordpress.org/support/users/sc0ttkclark/)
 * (@sc0ttkclark)
 * [2 years ago](https://wordpress.org/support/topic/block-api-adding-styles/#post-17532159)
 * I’ll take a look at this today. I thought there was something here already but
   maybe not documented.
 *  Thread Starter [PaulH](https://wordpress.org/support/users/paulhuckstepp/)
 * (@paulhuckstepp)
 * [2 years ago](https://wordpress.org/support/topic/block-api-adding-styles/#post-17534508)
 * Also, is it possible to add in support for the alignment attributes, and the 
   style and typography attributes that come with core blocks (e.g. Text and Background
   colours, margins, fonts, etc), or do these have to be set up as Pod fields instead?
 *  Plugin Author [Scott Kingsley Clark](https://wordpress.org/support/users/sc0ttkclark/)
 * (@sc0ttkclark)
 * [2 years ago](https://wordpress.org/support/topic/block-api-adding-styles/#post-17541116)
 * Sorry I wasn’t able to follow up on this yet. This is still on my list.
 *  Thread Starter [PaulH](https://wordpress.org/support/users/paulhuckstepp/)
 * (@paulhuckstepp)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/block-api-adding-styles/#post-17715489)
 * I’ve found that adding ‘enqueue_style’ to the block json sorts out the styles
   on the frontend. However, the ‘editor_style’ entry (or the ‘style’) doesn’t add
   the styles for the admin side. I can see it in the block array details in the
   HTML source whilst editing the page, but it doesn’t get loaded.
 * I tried with and without the full URL to the CSS file but can’t get it to work.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Block API – adding styles’ is closed to new replies.

 * ![](https://ps.w.org/pods/assets/icon.svg?rev=3286397)
 * [Pods - Custom Content Types and Fields](https://wordpress.org/plugins/pods/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/pods/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/pods/)
 * [Active Topics](https://wordpress.org/support/plugin/pods/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/pods/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/pods/reviews/)

## Tags

 * [block](https://wordpress.org/support/topic-tag/block/)
 * [styles](https://wordpress.org/support/topic-tag/styles/)

 * 4 replies
 * 2 participants
 * Last reply from: [PaulH](https://wordpress.org/support/users/paulhuckstepp/)
 * Last activity: [1 year, 11 months ago](https://wordpress.org/support/topic/block-api-adding-styles/#post-17715489)
 * Status: not resolved