CSS sibling-index() and sibling-count() functions
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 65/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- css
- Domain
- testing
Research direction
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.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- JavaScript
- Stars
- 591
- Forks
- 39
- Avg merge
- 3h 8m
- Merged PRs (30d)
- 2
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from web-platform-tests/interop
-
focus-area-proposal
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
web-platform-tests/interop#1363 · 2 comments · 32 reactions ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
web-platform-tests/interop#1362 · 1 comment · 5 reactions ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
web-platform-tests/interop#1267 · 5 comments · 2 reactions ·
-
meta
Difficulty 1/5 Under an hour Newbie friendliness 62/100
web-platform-tests/interop#931 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
web-platform-tests/interop#1522 ·
All issues in web-platform-tests/interop
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
web-platform-tests/wpt#65844 ·
Maintainers usually reply within 1 day
-
marketing
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Kanevry/session-orchestrator#108 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
awesomemotive/all-in-one-seo-pack#3238 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
andromarces/agent-loops#2055 ·
Maintainers usually reply within 1 day