CanopyTax / kremling

Embarrassingly simple css for React
https://kremling.js.org
Apache License 2.0
36 stars 4 forks source link

WIP - added k tag #34

Closed geoctrl closed 5 years ago

geoctrl commented 5 years ago

new proposal (concerning #32 )

what if we just export a simple k template literal tag that literally does nothing, except it now allows us to target the tagged template literal expression so we can get syntax highlighting

eg:

import { k } from 'kremling';

const styles = k`
  & .test {
    background-color: red;
  }
`;

this is extremely easy to set up in intellij/webstorm/etc - just add a new language injection for scss (css doesn't allow ampersands), and paste in this line for the pattern:

+ taggedString("k")

I did some research on building an intellij plugin, and it seems pretty straight forward.

vscode should be pretty easy too - just need to fork vscode-styled-components and make it work with k instead of styled.*

thoughts?

geoctrl commented 5 years ago

yeah - I'm thinking of merging both ideas into a k tag using the pipe idea you had

geoctrl commented 5 years ago

Closes #32

geoctrl commented 5 years ago

Closing this MR in favor of #33