Log1x / acf-composer

Compose ACF Fields, Blocks, Widgets, and Option Pages with ACF Builder on Sage 10.
https://github.com/Log1x/acf-composer
MIT License
423 stars 57 forks source link

feat(block): ✨ Add support to get the active block style #84

Closed dsturm closed 3 years ago

dsturm commented 3 years ago

After a dirty PR (#83) this PR adds support to get the active block style based on the CSS classes.

It uses the CSS classes set for the block and matches the patter is-style-{style}. If none is found in the class names the method getStyle() falls back to the default style defined in the $styles property.

This should make it possible to alter the block / component markup based on the active style.