- Increase MSRV to 1.66.0.
- Yew version is bumped to v0.21.
- Update syn to v2.
- Implemented a workaround that mitigates the linker error from Rust compiler (rust-lang/rust#111888).
- Added Server-side Rendering Support.
- Fixed a reference cycle between
Style
andStyleManager
. - Added
StyleManager::new()
to create a style manager with default configuration.
- Yew version is bumped to v0.20.
- Remove
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 preferfunction_component
+use_style!
/styled_component
. StyleSource
does not take a lifetime argument- Feature
parser
:StyleSource
now eagerly parses its input. - Feature
parser
: The conversion fromstr
have been changed toTryFrom
instead ofFrom
. If you're usingyew
, theIntoPropValue<StyleSource>
impls still exist, but now panic early during conversion. - Feature
parser
: This feature is now disabled by default. Use thecss!
, other macros and interpolation syntax to write styles, if you don't need to parse css at runtime.
- The
Style::new_*
API is more open for accepted types of theCss
parameter. - The name of styled components now defaults to the name of the function, like in
function_component
.
- Added an impl of
IntoPropValue<Classes>
forStyle
andStyleSource
when theyew_integration
feature is active.
- Yew version is bumped to 0.19.
- Added an API to style Yew Function Component.
random
features is now provided withfastrand
.- Added Yew hooks for Media Query.
- Fixed a bug where URL might not be parsed properly.
- 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.