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
417 stars 57 forks source link

being able to know block position to add classes (feature request) #258

Closed SergiArias closed 2 months ago

SergiArias commented 3 months ago

This is maybe an unreasonable request, as I wasn't able to solve it by myself, and maybe it's unfeasible given the way that Gutenberg saves the content and blocks. But in case it is, I thought that more people in the roots/sage community can get value from such a request.

Many times I have a block that because it's the last block or the first have different css. So it would be very useful to have a "context" of the $block object where we can tell if it's the first, the last, which comes next, which before, etc...

Currently I solve it using css, but I think it deviates of the tailwind usual way of inline styling.

Log1x commented 2 months ago

I don't see a sane way to accomplish this. If anyone has any ideas, feel free to hit me up.