CSS element()
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 55/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- css
- Domain
- testing-qa, web-dev
Research direction
Start by examining the existing CSS Images WPT source at https://github.com/web-platform-tests/wpt/tree/master/css/css-images to see if any element() tests already exist. Then, create a new directory css/css-images/element/ as suggested. The investigation involves reading the CSS Images Level 4 spec for the element() notation and designing tests for simple sources, live updates, and reference loops. 'Done' means a small, reviewed test suite is ready for browser teams.
Written by the indexing model from the issue text.
Description
Description
I propose an investigation of CSS element() which lets a page use the appearance of one element as an image elsewhere on the same page. The first target would be backgrounds that follow changes to their source, such as a small page preview or a canvas used in several places.
The investigation would establish a useful, clearly specified subset and build tests that browser teams can share. It would cover simple sources, live updates, image size, missing references, and reference loops.
Specification and existing tests
- CSS Images Level 4: element().
- Existing CSS Images WPT source and results.
- Earlier Interop proposal #442. Its rejection cited missing WPT, and follow-up guidance suggested a dedicated
css/css-images/element/directory.
The current directory listing has no dedicated element/ suite. The first task would include checking for relevant tests elsewhere before adding new ones.
Rationale
Reasons for including the feature
There are concrete examples of developers using this kind of visual reuse:
- A page minimap. The earlier proposal discussion reports its use on Stefan Judis's site.
- Canvas output used as CSS images. The CSS Paint polyfill README documents using
-moz-element()and-webkit-canvas()in some browsers, with canvas encoding throughtoDataURL()ortoBlob()in others. That is a concrete example of a library needing different paths for similar work. - Developer interest. Comments on the earlier proposal express interest in the feature. This is useful qualitative evidence, but it is not a representative survey or a usage estimate.
- A known test gap. The 2024 rejection identifies an actionable obstacle. An investigation can address that obstacle with a small, reviewed suite instead of repeating a broad implementation request.
- 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