Skip to content

Instantly share code, notes, and snippets.

@Gaurav0
Last active July 1, 2018 11:35
Show Gist options
  • Save Gaurav0/40bccb079229514d1cafefe88e27ab8b to your computer and use it in GitHub Desktop.
Save Gaurav0/40bccb079229514d1cafefe88e27ab8b to your computer and use it in GitHub Desktop.
Sass Attempt
import Ember from 'ember';
import scss from '../styles/app';
export default Ember.Controller.extend({
init() {
this._super(...arguments);
Sass.compile(scss, function(result) {
Ember.$('head').append(`<style>${result.text}</style>`);
});
},
appName: 'Ember Twiddle'
});
export default `
h1 {
color: blue;
span {
color: #00c;
}
}
`;
<h1>Welcome to <span>{{appName}}</span></h1>
<br>
<br>
{{outlet}}
<br>
<br>
{
"version": "0.11.0",
"EmberENV": {
"FEATURES": {}
},
"options": {
"use_pods": false,
"enable-testing": false
},
"dependencies": {
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js",
"ember": "2.10.0",
"ember-data": "2.10.0",
"ember-template-compiler": "2.10.0",
"ember-testing": "2.10.0",
"sass.js": "https://cdnjs.cloudflare.com/ajax/libs/sass.js/0.10.3/sass.sync.min.js"
},
"addons": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment