Release Notes
StyleX v0.11.0 is now available, with significant improvements in debugging, CLI caching, and documentation!
Debugging Improvements
Improved Runtime Debugging
We've made some big improvements to the information available in debug mode. We now include sourceMap information to indicate the file and line of the stylex.create
call responsible for providing styles on a given element. This information is contained in the data-style-src
prop in the DOM. To use, set debug
to true
in the StyleX config. (Thanks necolas)
CLI Cache Improvements
The StyleX CLI now includes better cache invalidation and expanded support:
- Cache now invalidates when config options change in the
StyleX
and.babelrc
configurations - Added support for relative file paths
- Now supports Deno applications
Documentation Updates
New theming recipes
We've added new documentation that provides improved guidance on theming, including best practices for resetting and merging themes, as well as dynamic color-scheme management using built-in functions. (Thanks nmn)
API enhancements
We've added documentation about the new PostCSS plugin and updated the docs to reflect the latest debug information. (Thanks necolas)
Miscellaneous
- We've added exported return types for
stylex.types.*
functions such asstylex.Color
andstylex.Length
. Now, expressions likestylex.types.color("red")
are explicitly typed asstylex.Color<string>
(Thanks nmn) - We've added an autofix to the
valid-styles
rule to provide autofix suggestions for border styles - We've made a fix to how we process multivalue shorthands with slashes (Thanks yasuhiro-yamamoto)
- Small typo fixes (Thanks mattstyles and necolas)