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

Built-in css pre-compilers in riot compiler? #1195

Closed
emilebosch opened this issue Sep 8, 2015 · 5 comments
Closed

Built-in css pre-compilers in riot compiler? #1195

emilebosch opened this issue Sep 8, 2015 · 5 comments

Comments

@emilebosch
Copy link

@emilebosch emilebosch commented Sep 8, 2015

Hi i was wondering if there some way i can use SASS in the riot tag compiler? The tag

<style type='sass'>

Tells me i can't use it unfortnately

@nippur72
Copy link
Contributor

@nippur72 nippur72 commented Sep 8, 2015

I've never tried it, but I think you can setup a custom CSS parser that renders SASS (with the help of sass.js):

riot.parsers.css.myCssParser = function(tagName, css) {
  return Sass.compile(css);
}
@GianlucaGuarini
Copy link
Member

@GianlucaGuarini GianlucaGuarini commented Sep 8, 2015

In the next riot release this will be easily possible, for now you can just use:

var riot = require('riot')
riot.parsers.css.sass = function(tagName, css) {
  return Sass.compile(css);
}
var myTag = require('my-tag.tag')
@emilebosch
Copy link
Author

@emilebosch emilebosch commented Sep 9, 2015

Thanks!

@emilebosch
Copy link
Author

@emilebosch emilebosch commented Sep 9, 2015

Any idea on when the next release will be?

@GianlucaGuarini
Copy link
Member

@GianlucaGuarini GianlucaGuarini commented Sep 9, 2015

You are welcome @emilebosch keep an eye on this page https://github.com/riot/riot/milestones

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.