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

Aperta
#343 3 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@Antonio-Laguna ci sta già lavorando.

Dal 10/11/2023.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

Describe the bug

Related to https://github.com/10up/10up-toolkit/issues/300 and https://github.com/10up/10up-toolkit/pull/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
Lingua principale
JavaScript
Stelle
147
Fork
21
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di 10up/10up-toolkit

Tutte le issue di 10up/10up-toolkit

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.