docs.rs failed to build stylist-0.9.1
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 is a CSS-in-Rust styling solution for WebAssembly Applications.
Usage
Yew Integration
To enable yew integration. Enable feature yew_integration in Cargo.toml.
You can create a style and use it with yew like this:
use Cow;
use *;
use css;
Procedural Macros
To create a stylesheet, you can use [style!]:
use style;
let style = style!.expect;
Style API
If you want to parse a string into a style at runtime, you can use [Style::new]:
use Style;
let style = new.expect;
YieldStyle API
Any struct that implements [YieldStyle] trait can call
self.style() to get a [Style] instance.
use Cow;
use ;
;
Everything that is not in a conditioned block will be applied to the Component the class of this style is applied to.
You may also use Current Selector (&) in CSS selectors to denote the container element:
&}
You can also use other CSS rules(such as: keyframes, supports and media):
{
from }
to }
}
{
}
&}
}
Theming
There're theming examples using Yewdux and yewtil::store.
Features Flags
macros: Enabled by default, this flag enables procedural macro support.random: Enabled by default, this flag usesrandcrate to generate a random class name. Disabling this flag will opt for a class name that is counter-based.yew_integration: This flag enables yew integration, which implementsClassesfor [Style] and provides aGlobalcomponent for applying global styles.