css-style
This crate provides you a typed CSS style with builder-style methods. See API Docs
NOTE: css-style is not (yet) prodction ready but is good for use in side projects and internal tools.
Features
- Typed CSS Values: CSS units and valuse are all typed (.e.g
Length
,Px
,BorderStyle::None
..etc) - Builder Methods: Provide builder-pattern methods for every css-style property (well, not all them yet! :P). So you don't need to import so many enum types.
Goal
The goal for this crate is to provide a Style
object with builder-pattern
methods to build up a CSS inline-style value, thus can be used with/by other
crates that works with styling HTML tags (such as yew
, seed
,
tinytemplate
..etc).
Non-Goal
The Style
object is not intended for parsing or retrieving typed values out of
it. Conisder using other crate for parsing purpose.
Qucik Example
use ;
let style = default
.and_transition
.and_position
.and_background
.and_border
.and_padding
.and_margin
.insert;
println!;
this would print:
);