Releases: futursolo/stylist-rs
Releases · futursolo/stylist-rs
Release 0.13.0
Release 0.12.1
Other Changes:
- Implemented a workaround that mitigates the linker error from Rust compiler (rust-lang/rust#111888).
Release 0.12.0
Other Changes:
- Added Server-side Rendering Support.
- Fixed a reference cycle between
Style
andStyleManager
. - Added
StyleManager::new()
to create a style manager with default configuration.
Release 0.11.0
Breaking Changes:
- 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 prefer
function_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.
Other Changes:
- 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
.
Release 0.10.1
Other Changes:
- Added an impl of
IntoPropValue<Classes>
forStyle
andStyleSource
when
theyew_integration
feature is active.
Release 0.10.0
Breaking Changes:
- Yew version is bumped to 0.19.
Other Changes:
- 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.
Release 0.9.2
Other Changes:
- Fixed a misconfiguration causing documentation failing to build on
docs.rs
.
Release 0.9.1
Other Changes:
- Removed an unused import.
Release 0.9.0
Breaking Changes:
Style
andGlobalStyle
no longer implementsFromStr
.Style
andGlobalStyle
now takes any type that implements
Into<StyleSource>
as a source for a stylesheet.style_str
method inYieldStyle
renamed tostyle_from
and returns aStyleSource<'static>
.- Accepted at-rules are limited to
@keyframes
,@supports
and
@media
.
Other Changes:
- Added a Procedural Macro API that parses the Stylesheet at the compile
time. (Thanks to @WorldSEnder for contributing the inline syntax.) - 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
.
Release 0.8.0
Breaking Changes:
Style::new()
andStyle::create()
now takes a new traitIntoSheet
for
Stylesheet which is implemented by default for both
stylist::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.
Other Changes:
- 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
featurerandom
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.