Skip to content

Apply postcss transforms for tagged template css#4

Open
felipeccastro wants to merge 1 commit into
rtsao:masterfrom
felipeccastro:patch-1
Open

Apply postcss transforms for tagged template css#4
felipeccastro wants to merge 1 commit into
rtsao:masterfrom
felipeccastro:patch-1

Conversation

@felipeccastro
Copy link
Copy Markdown

Atom will enable the syntax highlighting for css if the tagged template is named css (instead of csjs).
I know this is kind of out of the scope of this repo, but it's such a minor change that it doesn't seem necessary to keep a separate project just for that.

Atom will enable the syntax highlighting for css if the tagged template is named `css` (instead of `csjs`).
I know this is kind of out of the scope of this repo, but it's such a minor change that it doesn't seem necessary to keep a separate project just for that.
@rtsao
Copy link
Copy Markdown
Owner

rtsao commented Oct 15, 2016

Cool! I think making the tag name configurable seems like a good idea (as opposed to being hardcoded to csjs)

Could you update your PR so it can be passed in via config (like plugins are) as opposed to hardcoding css?

Perhaps something like:

{
  "plugins": [["csjs-postcss", {
    "tagName": "css"
  }]]
}

And a test case for this would be nice to have as well!

@arturi
Copy link
Copy Markdown

arturi commented Mar 17, 2017

Hi! Thanks so much for the transform. And csjs. I added the option, but also renamed the transform, since I’m using it without csjs (with this https://github.com/arturi/template-css) and I think it could be useful for any other package doing css in template strings. What do you think: https://github.com/arturi/babel-plugin-template-strings-postcss? Should I publish a separate version, or should I add tests and send a PR? Are you interested in making the transform not csjs-specific, letting it run free?

@rtsao
Copy link
Copy Markdown
Owner

rtsao commented Mar 17, 2017

@arturi Yeah, I see no reason for this to be CSJS-specific. Happy to merge in a PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants