CSS element()

Aperta
#1,451 2 commenti 24 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
55/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
css

Direzione di ricerca

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.

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

Descrizione

investigation-effort-proposal
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

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 through toDataURL() or toBlob() 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.
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.