43081j / 43081j/postcss-lit

Support more variants of css inside lit components

Abierto
#47 6 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
TypeScript
Estrellas
90
Forks
9
Merge medio
1 d 9 min
PR fusionados (30 d)
3

Descripción

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.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
css, javascript, typescript
Área
build-system, tooling
Tipo de issue
Nueva funcionalidad
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Bien especificado
Aptitud para principiantes
45/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.