typicode / mistcss

💧 Write atomic components using only CSS! (JS-from-CSS™)
https://typicode.github.io/mistcss
MIT License
806 stars 18 forks source link

Feat: add css variable support #39

Closed The-Code-Monkey closed 5 months ago

The-Code-Monkey commented 5 months ago

from what i found before doing

&[data-size="sm"] didnt work but &[data-size='sm'] did so i updated the regex string to support double quotes.

this PR also now adds variable support. Might need a custom css.d.ts file if the as string is not wanted, just due to react not liking inline variables as they are not part of CSSType yet.

fixes #36 fixes #40

The-Code-Monkey commented 5 months ago

@typicode let me know your thoughts and I'll do any tweaks if you want any doing

typicode commented 5 months ago

Thanks for the PR. I feel that things with the current codebase are getting quite complex.

I plan to rewrite the parsing code, I think it can be improved. Also, I will re-organize a few things in preparation of other features.

Since tests are passing, I can merge it and release a new version if you need it?

The-Code-Monkey commented 5 months ago

@typicode yeah I understand, I did need this, but it's up to you whether to merge something like this now or add it when you rebuild things

The-Code-Monkey commented 5 months ago

@typicode any update on this as I have some other things I'd like to suggest but I have built them on top of this pr

typicode commented 5 months ago

I'm making good progress, but I'd like to rewrite docs and iron things out before releasing the next version.

The-Code-Monkey commented 5 months ago

@typicode of course no worries. The only other thing I came across and fixed was I added a list of html element that don't support child element so I added that logic in.

The-Code-Monkey commented 5 months ago

I will wait for your rewrite before trying to add anything else

The-Code-Monkey commented 5 months ago

closing due to further work needed.