AdvancedCustomFields / AdvancedCustomFields/acf
ACF blocks - Switch to edit mode fields inherit editor styles
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 945
- Forks
- 197
- PR merge metrics
- No merged PRs in 30d
Description
Hey @elliotcondon
If we use edit mode for ACF blocks within the block itself, the default ACF field styles break, because the fields inherit editor styles, if a theme use the WordPress function add_editor_styles().
Here is only one example, how it looks in my case:
However, depending on the style contained in add_editor_styles(), the ACF fields can have a completely different appearance.
I know there is currently no way to fix this. But I was wondering if it is possible to open these block fields in a modal window instead. The modal window content should be located outside of the block editor ".editor-styles-wrapper" container. I think this is the only way to avoid having editor styles inherited from ACF block fields.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing ACF block edit mode with a theme that uses add_editor_styles(), then inspect how the fields inherit styles from the editor-styles-wrapper container. The change is complete when the fields render in a modal outside that container without inheriting the editor styles; the issue mentions no files or tests to run.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, wordpress
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100