A CSS-in-Rust styling solution for WebAssembly Applications
YieldStyle
. This API can be easily reproduced in user code, if need be,
but often leads to clumsy code in struct components. Use alternative API and prefer
function_component
+ use_style!
/styled_component
.StyleSource
does not take a lifetime argumentparser
: StyleSource
now eagerly parses its input.parser
: The conversion from str
have been changed to TryFrom
instead of From
. If you're using yew
, the IntoPropValue<StyleSource>
impls still exist, but now panic early during conversion.parser
: This feature is now disabled by default. Use the css!
, other
macros and interpolation syntax to write styles, if you don't need to parse css at
runtime.Style::new_*
API is more open for accepted types of the Css
parameter.function_component
.Style
and GlobalStyle
no longer implements FromStr
.Style
and GlobalStyle
now takes any type that implements
Into<StyleSource>
as a source for a stylesheet.style_str
method in YieldStyle
renamed to style_from
and returns a StyleSource<'static>
.@keyframes
, @supports
and
@media
.nom
to v7
.parser
will make the bundle
~70K smaller).{}
(std::fmt::Display
)
in browser developer console.@supports
and @media
can now appear in a Block
.Style::new()
and Style::create()
now takes a new trait IntoSheet
for
Stylesheet which is implemented by default for both
stylist::ast::Sheet
and everything that implements AsRef<str>
.yew
has been renamed back to yew_integration
.Style
is now !Send
and !Sync
.:hover
) like emotion
and styled-components.GlobalStyle
struct to register global styles.<Global />
Component for global styling for yew applications.@supports
CSS at-rule.random
is disabled.StyleManager
type to manage the behaviour of styles.stylist_core
.stylist::ast
.