Home › Forums › Gutenberg › acf_register_block_type styles problem in ACF 5.10.x › Reply To: acf_register_block_type styles problem in ACF 5.10.x
Something definitely changed from 5.9 to 5.10. I’ve been looking/waiting for a fix to this for weeks now. I also have a series of simple blocks that were all working fine prior to v5.10.x. I am using $block[‘backgroundColor’] and $block[‘textColor’] to apply the appropriate CSS classes to my blocks. Works fine on the front-end, but in the editor, it doesn’t work at all. Using my dev tools, it looks like everything inside of the “acf-block-preview” div is a click behind the div with a data-type of “acf/your-block-name”:
I’ve basically had to resort to writing CSS that forces the wrapper to be transparent (with an !important tag), and then use the class that gets applied to that to style the inner div the way it is supposed to be. Very frustrating. I hope there is a fix soon that hopefully doesn’t break the my hacky solution that I’ve had to use over the last six weeks moving forward. I haven’t even seen this problem reported in the forums, which is very surprising. This thread appears to have been posted about 4 weeks ago and it is marked as “Unread.”
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
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 Privacy Policy. If you continue to use this site, you consent to our use of cookies.