Tools for generating scoped css.
```rs fn main() { let mycss = scopedcss::css!( .my_class { color: red; } );
// this will generate a struct with a .classes.my_class field which // is an obfuscated &'static str.
let myapp = scoped::smd!(
// or the following, which generated a static variable named css
scopedcss::staticcss!(
.my_class {
color: red;
}
)
``` Classes, ids, tags and attributes are supported. Selectors like In addition, nested selectors are supported. This is pretty alpha, and is only being published for a demo :)Supported CSS features
>
are not.
scoped_css::static_css!(
body.my_app #some_id[some-attr="hello"] {
.nested_stuff_is_supported_too {
color: blue;
}
}
)
TODO and drawbacks
>
to_css_string
function should be a trait, so that CSS can be passed around.