Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sass/Less support #1

Closed
ebryn opened this issue Mar 4, 2015 · 13 comments
Closed

Sass/Less support #1

ebryn opened this issue Mar 4, 2015 · 13 comments

Comments

@ebryn
Copy link
Collaborator

ebryn commented Mar 4, 2015

It should be possible to use with CSS preprocessors like Sass/Less

@JackCA
Copy link

JackCA commented Mar 4, 2015

😀 I'd love to help but am not sure where to start... Do preprocessors self-identify or would there need to be one-offs for each one?

@ebryn
Copy link
Collaborator Author

ebryn commented Mar 5, 2015

I think we would start by identifying additional file suffixes that we need to care about and then perhaps generate files with @imports rather than concatenating ourselves.

@runspired
Copy link
Contributor

Just make sure stylus is supported ;)

@chriseppstein
Copy link

@ebryn if you support legal css, then you support every compiler's output.

@JackCA
Copy link

JackCA commented Mar 7, 2015

yeah we'll run into an issue with the & in at least sass won't we?

Would somehow using css comments as a placeholder for class name injection work better?

@chriseppstein
Copy link

comments are a bad api.

I would suggest just adhering to the css spec. E.g.

component {
  ...
}

would work just fine because it's a legal selector.

If you need to control behavior, you can invent your own at rules... those will survive the compiler.

@JackCA
Copy link

JackCA commented Mar 9, 2015

Ah, that seems like a great solution

@indirect
Copy link
Contributor

I really want to use this, but I really don't want to go back to regular CSS :P 👍 from me

@Globegitter
Copy link
Contributor

I tried to monkey-patch sass support in by just using node-sass to compile scss files to css see https://github.com/Globegitter/ember-component-css/blob/master/index.js#L58, but when I serve my app I get the following error:

ENOENT: no such file or directory, scandir 'client/tmp/caching-writer-dest-dir_xPIU0A.tmp/app/'
Error: ENOENT: no such file or directory, scandir 'client/tmp/caching-writer-dest-dir_xPIU0A.tmp/app/'
    at Error (native)
    at Object.fs.readdirSync (fs.js:805:18)
    at walkSync (client/node_modules/ember-component-css/node_modules/walk-sync/index.js:14:20)
    at Funnel.processFilters (client/node_modules/ember-component-css/node_modules/broccoli-funnel/index.js:140:15)
    at Funnel.handleReadTree (client/node_modules/ember-component-css/node_modules/broccoli-funnel/index.js:129:10)
    at lib$rsvp$$internal$$tryCatch (client/node_modules/ember-component-css/node_modules/broccoli-funnel/node_modules/rsvp/dist/rsvp.js:489:16)
    at lib$rsvp$$internal$$invokeCallback (client/node_modules/ember-component-css/node_modules/broccoli-funnel/node_modules/rsvp/dist/rsvp.js:501:17)
    at lib$rsvp$$internal$$publish (client/node_modules/ember-component-css/node_modules/broccoli-funnel/node_modules/rsvp/dist/rsvp.js:472:11)
    at lib$rsvp$asap$$flush (client/node_modules/ember-component-css/node_modules/broccoli-funnel/node_modules/rsvp/dist/rsvp.js:1290:9)
    at process._tickCallback (node.js:349:13)

This was just meant to be getting a quick and dirty solution, since I was looking for a solution like this for quite some time, but no idea what this error means.

@buschtoens
Copy link
Contributor

Really looking forward for using this in combination with Sass. Doesn't the new addon system allow for a simple integration of pre- / post-processors?

@ebryn
Copy link
Collaborator Author

ebryn commented Mar 23, 2015

Implementation strategy outlined here, if anyone wants to give it a go: #10 (comment)

@trentmwillis
Copy link
Contributor

Opened a PR with one potential approach to solving this. Thoughts and opinions welcome!

ebryn pushed a commit that referenced this issue Apr 11, 2015
@ebryn
Copy link
Collaborator Author

ebryn commented Apr 11, 2015

Closed via #20 for Sass. Opening #21 for less.

@ebryn ebryn closed this as completed Apr 11, 2015
jeffhertzler pushed a commit to jeffhertzler/ember-component-css that referenced this issue Jul 8, 2015
ebryn pushed a commit that referenced this issue Mar 22, 2016
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

No branches or pull requests

8 participants