Skip to content

Instantly share code, notes, and snippets.

@fd
Created August 13, 2015 08:13
Show Gist options
  • Save fd/f6bbb394b7b85b267a86 to your computer and use it in GitHub Desktop.
Save fd/f6bbb394b7b85b267a86 to your computer and use it in GitHub Desktop.
css-modules
.title {
// ...
}
.body {
// ...
}
<h1 class="{{ fooBar.css.title }}">{{ fooBar.title }}</h1>
<div class="{{ fooBar.css.body }}">{{ fooBar.body }}</div>
import CSS from './mod.css!';
import TMPL from './mod.html!';
@State({ template:Url: TMPL })
class FooBarController {
css = CSS;
title = "Hello Wolrd!"
body = "Some body text."
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment