Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

spaces on selectors (or containers in general) don't work

Aperta
#172 9 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
javascript
Ambito
tooling

Direzione di ricerca

Start with the parser construction and .toString() example in the issue, then trace how selector containers and their spaces values are serialized. Reproduce the :not case and determine how container-level spacing should be represented so the output preserves the requested spaces; add coverage for that behavior.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

parser
  .pseudo({
    value: ':not',
    nodes: [
      selectorParser.selector({
        nodes: [selectorParser.tag({ value: 'span' })],
        spaces: { before: ' ', after: ' ' },
      }),
      selectorParser.selector({
        nodes: [selectorParser.tag({ value: 'span' })],
        spaces: { before: ' ', after: ' ' },
      }),
    ],
  })
  .toString() // ':not(span,span)'

I think the idea is that the spaces go on the nodes, but that's a bit unwieldy of an API when walking through the or transforming selectors, since you drill down and find the first non-container thing to apply spacing too.

Lingua principale
JavaScript
Stelle
214
Fork
63
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

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 postcss/postcss-selector-parser

Tutte le issue di postcss/postcss-selector-parser

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.