Replace CSSOM so new CSS features are supported
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Refactoring
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- css, javascript
Direzione di ricerca
Inizia con l’esempio parseHTML nell’issue e analizza come linkedom integra CSSOM; non sono indicati né un file sorgente né un test. Confronta il comportamento attuale di CSSOM con i parser candidati del benchmark collegato. Il lavoro è completato quando il CSS annidato e altre regole CSS moderne vengono analizzati senza eccezioni, mantenendo accettabili la funzionalità CSS necessaria e le performance.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Hi,
I noticed that currently linkedom fails to parse styles with nested CSS rules. Here's a sample code:
import {parseHTML} from "linkedom";
const doc = parseHTML(`
<style>
.parent { .child { color: red; }}
</style>
`).document;
console.log(doc.children[0].sheet);
Looking into it, it seems like this is an issue with CSSOM, which makes sense considering that project stopped receiving updates 5 years ago and is marked as unmaintained. Although I didn't check, I assume other kinds of 'modern' CSS rules will also raise an exception when parsed.
I would like to know if there is interest in replacing it with an up-to-date CSS parser implementation.
Looking online, I found a benchmark that shows that a few other CSS parsers more or less match the performance of CSSOM, which I know is an important factor for this project.
If this is desired I can take a look into changing the backing implementation, probably trying the projects in the order they appear in that benchmark (I don't know which of those provides the functionalities linkedom requires).
- Lingua principale
- HTML
- Stelle
- 2.1k
- Fork
- 104
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di WebReflection/linkedom
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
WebReflection/linkedom#329 · 5 commenti ·
-
`el.style.property = ''` and `e.style.setProperty('property', '')` should delete the property Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 52/100
WebReflection/linkedom#327 · 1 commento ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 48/100
WebReflection/linkedom#326 · 5 commenti ·
-
Build Apps For AI Agent. Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 15/100
WebReflection/linkedom#321 · 1 commento ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
WebReflection/linkedom#317 · 2 reazioni ·
Tutte le issue di WebReflection/linkedom
Issue simili
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100
motiondivision/motion#3849 ·
-
area-clientside-dartpad
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
needs-triage Platform(Default)
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
-
Support bun dedupe Apertaenhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
antfu/node-modules-inspector#214 ·