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

Stylelint custom-property-pattern doesn't fully support variables created by theme.json #343

Open
1 task done
kdo opened this issue Nov 10, 2023 · 3 comments
Open
1 task done
Assignees

Comments

@kdo
Copy link

kdo commented Nov 10, 2023

Describe the bug

Related to #300 and #314

theme.json generates font size and font family variables with mixed kebab-case and wp--kebab--case, for example: --wp--preset--font-family--headline or --wp--preset--font-size--lg.

This throws stylelint error: Expected custom property name to be kebab-case or wp--kebab--case custom-property-pattern

Steps to Reproduce

  1. Add font size or font family variable in theme.json
  2. Use generated variable in theme CSS
  3. Stylelint throws error

Screenshots, screen recording, code snippet

No response

Environment information

No response

WordPress information

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@Antonio-Laguna Antonio-Laguna self-assigned this Nov 10, 2023
@nicholasio
Copy link
Member

nicholasio commented Nov 20, 2023

Discussed in 10up-toolkit council meeting and we agreed to relax this rule.

@nicholasio
Copy link
Member

@Antonio-Laguna would this be a breaking change? should we include it as part of v6/the next major of stylelint

@Antonio-Laguna
Copy link
Member

@nicholasio I don't think so since it does relax the rule? This needs to be fixed though plus another minor thing I found around nesting for stylelint

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants