Home Forums Gutenberg ACF 5.8 blocks – styles


ACF 5.8 blocks – styles

  • Hi all,
    I’m testing ACF 5.8.2 beta and I can’t find one basic feature of guttenberg blocks – adding styles for front-end and back-end.
    It would be great if acf_register_block(…) accepts as arguments paths to block styles ( or at least to backend styles )

    Otherwise, the integration looks great.

  • As mentioned in this Blog-Post, you should use admin_enqueue_scripts() and wp_enqueue_scipts() functions.

  • You can also add an editor stylesheet using wordpress’s existing functionality

    so what I’d did was setup my sass build script to exported my block specific css to an editor-styles.css as well as the main stylesheet.

    Its a bit fiddler to make sure that your blocks’ css is self contained but it works pretty well and beats maintaining two different stylesheets

    • asolu

    • January 23, 2019 at 3:33 am

    by using wp_enqueue_scipts() , admin_enqueue_scripts() not work

    • Taylor

    • October 1, 2019 at 2:12 am

    Can you please give more details about how you did that?

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.