- Added an API to style Yew Function Component.
- Fixed a misconfiguration causing documentation fails to build on
docs.rs
.
- Removed an unused import.
Style
andGlobalStyle
no longer implementsFromStr
.Style
andGlobalStyle
now takes any type that implementsInto<StyleSource>
as a source for a stylesheet.style_str
method inYieldStyle
renamed tostyle_from
and returns aStyleSource<'static>
.- Accepted at-rules are limited to
@keyframe
,@supports
and@media
.
- Added a Procedural Macro API that parses the Stylesheet at the compile time.
- Parser will now check stylesheets more strictly.
- Parsed results are now cached.
- Updated
nom
tov7
. - Runtime parser is now optional (disabling
parser
will make the bundle ~70K smaller). - Fixed comment handling.
- Panic-based behaviour now displays the error with
{}
(std::fmt::Display
) in browser developer console. @supports
and@media
can now appear in aBlock
.
Style::new()
andStyle::create()
now takes a new traitIntoSheet
for Stylesheet which is implemented by default for bothstylist::ast::Sheet
and everything that implementsAsRef<str>
.- Feature
yew
has been renamed back toyew_integration
. - Selectors list now gets a class name added for each selector.
Style
is now!Send
and!Sync
.- Stylist now treats pseudo class selectors (e.g.:
:hover
) like emotion and styled-components.
- Added a
GlobalStyle
struct to register global styles. - Added a
<Global />
Component for global styling for yew applications. - Supported
@supports
CSS at-rule. - Added an alternative counter-based class name on the style when
feature
random
is disabled. - Added a
StyleManager
type to manage the behaviour of styles. - Moved AST and Parser logic to a new crate
stylist_core
. - AST has been exposed under
stylist::ast
. - Improved performance for looking up cached styles.
- Improved Examples.
- Documentation now shows feature flags.
Style::new()
now takes anInto<Cow<'static, str>>
instead ofInto<String>
and returnsstylist::Error
instead ofString
when encountering an error.Style::create()
now takesInto<Cow<'static, str>>
for class prefix and css string and returnsstylist::Error
instead ofString
when encountering an error.Style
no longer implementsToString
.
- Added a new API
YieldStyle
. - Added theming examples.
- Styles are now cached by default.
- Fixed a Bug where
.a-class-name
is after@media
would cause parser to return an error. - Added Docs.
- Removed Unnecessary Clones.
- Optimised for Performance.
style.get_class_name()
no longer consumes the style and returns a&str
instead of an owned string.- Seed Integration is Removed.
- Added
Style::new
which does not require a component name. - Aesthetically pleasing Class Name.
- Replaced
lazy_static
withonce_cell
. - Updated nom to
v6
. - Updated Yew to
v0.18
. - Removed Unnecessary Clones.
- Optimised for Performance.