Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

CSSStyleDeclaration misses dashed attributes

Aperta
#1,672 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
typescript
Ambito
frontend, web-dev

Direzione di ricerca

Inizia con l’interfaccia CSSStyleDeclaration generata da questo repository e confronta i suoi attributi camelCase attuali con la specifica CSSOM collegata nell’issue. Conferma il comportamento degli attributi con trattino usando il playground TypeScript fornito; il lavoro è completato quando le proprietà con trattino, come font-size, sono rappresentate e vi si può accedere come mostrato.

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

Descrizione

CSSStyleDeclaration has two attributes for each CSS property. A dashed and a camelCase representation. The CSSStyleDeclaration interface only contains the camelCase representation currently.

partial interface CSSStyleDeclaration {
  [CEReactions] attribute [LegacyNullToEmptyString] CSSOMString _dashed_attribute;
};

The dashed attribute attribute, on getting, must return the result of invoking getPropertyValue() with the argument being dashed attribute.

Setting the dashed attribute attribute must invoke setProperty() with the first argument being dashed attribute, as second argument the given value, and no third argument. Any exceptions thrown must be re-thrown.

For example, for the font-size property there would be a font-size IDL attribute. In JavaScript, the property can be accessed as follows, assuming element is an HTML element:

element.style['font-size'];

https://www.w3.org/TR/cssom-1/#dom-cssstyledeclaration-getpropertyvalue

Please find a demonstration of this issue here: Playground Link

Lingua principale
TypeScript
Stelle
740
Fork
474
Merge medio
2g 8h
PR unite (30g)
15

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

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 microsoft/TypeScript-DOM-lib-generator

Tutte le issue di microsoft/TypeScript-DOM-lib-generator

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.