AdvancedCustomFields / AdvancedCustomFields/acf

ACF blocks - Switch to edit mode fields inherit editor styles

Open
#492 1 comment 1 reaction 0 assignees View on GitHub

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:

Bildschirmfoto 2021-05-07 um 13 34 27

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.