web-platform-tests / web-platform-tests/interop

CSS `random-item()`

Open
#1,403 2 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

focus-area-proposal
Dominant language
JavaScript
Stars
524
Forks
35
Avg merge
1d 4h
Merged PRs (30d)
10

Description

Description

The random-item() function resolves to a random item from among its list of items.

color: random-item(--x, red, blue, green);
Specification

https://drafts.csswg.org/css-values-5/#random-item

web-feature

No response

Test Links

https://wpt.fyi/results/css/css-values?label=master&label=experimental&aligned&q=random-item

Additional Signals

Chromium:
https://issues.chromium.org/issues/537461414

Webkit:
https://bugs.webkit.org/show_bug.cgi?id=317312
https://bugs.webkit.org/buglist.cgi?quicksearch=random-item

[css-values-5] Enable random-item() by default: https://github.com/WebKit/WebKit/pull/71629

in Safari Technology Preview 251:
https://webkit.org/blog/18194/release-notes-for-safari-technology-preview-251/

Firefox:
https://bugzilla.mozilla.org/show_bug.cgi?id=2072591

Bluesky post mentioning early intention to ship random() and random-item() together:
https://bsky.app/profile/webdevs.firefox.com/post/3muma3mocdk2f

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the CSS Values 5 random-item() specification and the linked WPT results filtered for random-item. Review the Chromium, WebKit, and Firefox signals to determine the current implementation status and identify what Interop tracking work is expected. Done should be defined by the relevant cross-browser test results and project status, but this issue does not name a file or test to change.

Written by the indexing model from the issue text.

Assessment

Tech stack
css
Domain
testing-qa
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.