typicode/mistcss

New renderer feedback.

The-Code-Monkey opened this issue · 1 comments

Hey @typicode

Is it possible to support variables like this aswell.

https://github.com/The-Code-Monkey/mistcss/blob/feat/variables/fixtures/Foo.mist.tsx

Also with the rewrite it's not possible to have multiple elements per file.

And there are also some html elements that do not support child elements e.g. input.

I can take a look at things like childless elements next week but in terms of the variables unless I get time to understand the new parser fully I won't be able to implement this.

I've linked my repo where I added some stuff prior to the rewrite, but it was very custom to my needs rather than the packages aim

Is it possible to support variables like this aswell.

While interesting, I feel it's a bit too complex. For now, I prefer to keep MistCSS simpler/generic and not introduce specific CSS frameworks support.

Also with the rewrite it's not possible to have multiple elements per file.

I reverted it because it makes supporting other libraries more complex. Astro, Svelte and Vue (with an exception) use single-file components.

It's possible to do something like this:

// Card.tsx
export * from './_CardImage.mist'
export * from './_CardTitle.mist'

I can take a look at things like childless elements next week

PR welcome 👍 If you're busy or prefer me to do it, let me know I have some free time.

Otherwise, only renderers/react functions need to be modified:

  • renderFunction
  • renderFunctionArgs
  • "import type { JSX, PropsWithChildren } from 'react'" in render

Adding a function to test if data.tag is a void element (https://html.spec.whatwg.org/multipage/syntax.html#void-elements).

I've linked my repo where I added some stuff prior to the rewrite, but it was very custom to my needs rather than the packages aim

Thanks!