Support more variants of css inside lit components
- Vorherrschende Sprache
- TypeScript
- Sterne
- 90
- Forks
- 9
- Ø Merge
- 1 T. 9 Min.
- Gemergte PRs (30 T.)
- 3
Beschreibung
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.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- css, javascript, typescript
- Bereich
- build-system, tooling
- Issue-Typ
- Feature
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Klar beschrieben
- Anfängerfreundlichkeit
- 45/100