Support more variants of css inside lit components
- Lingua principale
- TypeScript
- Stelle
- 90
- Fork
- 9
- Merge medio
- 1g 9m
- PR unite (30g)
- 3
Descrizione
Now, the plugin works with css places inside `css` tag. However, css may often be stored near html
Example 1 (`html` tag):
```js
import {styles} from 'somewhere';
//...
html`
${styles}
.abc {
color: green;
}
...
....
`
```
Example 2 (`svg` tag):
```js
import {styles} from 'somewhere';
//...
svg`
${styles}
// ....
....
`
```
There are also some minor cases when some styles are inlined:
```js
html`
...
`
```
The proposal is to at least add support of first 2 major cases (Example 1, 2), however, would be nice to support all possible variants.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
The plugin currently extracts CSS from `css` tagged template literals. Look at the parser in src/index.ts to understand the current extraction logic. The goal is to extend it to also find CSS inside `html` and `svg` tagged literals, particularly within `` blocks. Start by examining how the plugin traverses AST nodes and test with the examples given in the issue. Check test files to see existing patterns and add new test cases for the new variants.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- css, javascript, typescript
- Ambito
- build-system, tooling
- Tipo di issue
- Funzionalità
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Specificata chiaramente
- Idoneità per principianti
- 45/100