CSS sibling-index() and sibling-count() functions

Aperta
#1,460 3 commenti 39 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
65/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
css
Ambito
testing

Direzione di ricerca

The issue is about fixing WPT failures for sibling-index() and sibling-count() CSS functions. Start by examining the test results at https://wpt.fyi/results/css/css-values/tree-counting/ to identify specific failing tests. Review the CSS Values and Units Level 5 specification at https://drafts.csswg.org/css-values-5/#tree-counting to understand the expected behavior. Look at the existing test files in the web-platform-tests repository under css/css-values/tree-counting/ to understand the test structure and determine what needs to be corrected. Done looks like all tests pass.

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

Descrizione

focus-area-proposal
Description

sibling-index() and sibling-count() can be used as integers in CSS property values to style elements based on their position among its siblings, or the total number of siblings respectively. These functions can be used directly as integer values, but more interestingly inside calc() expressions.

Example:

li {
  margin-left: calc(10px * sibling-index());
}

Example use cases for this are staggered animations setting the animation- or transition-delay based on the sibling position, and building a radial menu.

These functions are shipped in all engines, but all have wpt failures.

Specification

https://drafts.csswg.org/css-values-5/#tree-counting

web-feature

https://web-platform-dx.github.io/web-features-explorer/features/sibling-count/

Test Links

https://wpt.fyi/results/css/css-values/tree-counting/

Additional Signals

No response

Lingua principale
JavaScript
Stelle
591
Fork
39
Merge medio
3h 8m
PR unite (30g)
2

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

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 web-platform-tests/interop

Tutte le issue di web-platform-tests/interop

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.