atomico icon indicating copy to clipboard operation
atomico copied to clipboard

sass or other css preprocessor support

Open DanavsSite opened this issue 2 years ago • 1 comments

Is your feature request related to a problem? Please describe. no

Describe the solution you'd like i think it'd if we can just import them like 'import "./hello.css"'

DanavsSite avatar May 15 '23 08:05 DanavsSite

Hi @DanavsSite, I find the functionality you mentioned interesting. I believe we should include it in the @atomico/vite package. I have an idea for a syntax like this:

import style from ‘./style.css?atomico’;

function component(){...}

component.styles = style;

Option 2 involves automatic association, but it requires AST analysis of the code:

import ‘./style.css?atomico’;

function component(){...}

This implies more advanced processing that can automatically determine the relationship between the CSS file and the component, without the need to manually assign the styles variable as in option 1.

Good idea, I'll see if I can work on it

UpperCod avatar May 19 '23 17:05 UpperCod