docs.rs failed to build stylist-0.14.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
stylist-0.13.0
Stylist
Stylist is a CSS-in-Rust styling solution for WebAssembly Applications.
This is a fork of css-in-rust.
Install
Add the following to your Cargo.toml:
= "0.14"
Usage
For detailed usage, please see documentation.
Yew Integration
To style your component, you can use styled_component attribute with css!
macro.
use *;
use styled_component;
Standalone
To create a stylesheet, you can use style!:
use style;
let style = style!.expect;
// stylist-uSu9NZZu
println!;
Runtime Style
If you want to parse a string into a style at runtime, you can use Style::new:
use Style;
let style_str = r#"
background-color: red;
.nested {
background-color: blue;
width: 100px
}
"#;
let style = new.expect;
// stylist-uSu9NZZu
println!;
Theming
There's theming example using Yew Context API.