The alternative is to create a list of classes for every style you want to provide and output them all into the class and then create a css rule for every one of those classes. Of course this means that you’re going to spend a lot more time coding and keeping all those things straight and every time you change one thing you need to change several others.
On the other hand, the main reason for separation in my opinion is to allow changes by other developers to be made more quickly in the future. Separation in this case will only make that job more difficult.
Since the goal of your admin interface is to allow the user to set the styles of individual elements then I personally don’t see any reason why you shouldn’t just output those styles. This will also allow for faster changes in the future. If for example you want to allow a new color or font you just need to add it to what can be selected by the user and you’re done.
This to me is no different than allowing the editor to apply colors, fonts, sizes and any number of other formatting options in the WP content editor.
Sometimes it’s better not to over complicate things by insisting on doing what is considered “best practice” by the masses.
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!
Sorry for the issues with ACF's API SSL certificate this morning. We've resolved it and your activations and downloads should be back to normal again. Thanks! ^LG— Advanced Custom Fields (@wp_acf) November 2, 2022
© 2022 Advanced Custom Fields.