Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duotone: using references in theme.json breaks site editor and don't work in front #49751

Open
oandregal opened this issue Apr 12, 2023 · 1 comment
Labels
[Block] Image Affects the Image Block Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Type] Bug An existing feature does not function as intended

Comments

@oandregal
Copy link
Member

oandregal commented Apr 12, 2023

Related #49745 #49715

In theme.json styles can be referenced to an existing top-level style (docs).

The following example makes the image's duotone filter be linked to the top-level filter:

{
  "styles": {
    "filter": {
      "duotone": "var(--wp--preset--duotone--magenta-yellow)"
    },
    "blocks": {
      "core/image": {
        "filter": {
          "duotone": { "ref": "styles.filter.duotone" }
        }
      }
    }
  }
}

The expected result is that the images should have that filter applied.

Instead, what happens is that:

@oandregal oandregal added the Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json label Apr 12, 2023
@oandregal
Copy link
Member Author

cc @ajlende @jeyip

@Thelmachido Thelmachido added [Block] Image Affects the Image Block [Type] Bug An existing feature does not function as intended Needs Testing Needs further testing to be confirmed. labels Apr 12, 2023
@ndiego ndiego removed the Needs Testing Needs further testing to be confirmed. label Apr 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Image Affects the Image Block Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

3 participants