Repository navigation
v3.10.0
Minor Changes
- #385
7dc285eThanks @tenphi! - Add a React-freeconfigure()andresetConfig()to@tenphi/tasty/zero, so Node build scripts can set units, states, recipes, keyframes and the other options that shape generated CSS without installingreact(see the Programmatic API section of the zero-runtime docs for what it emits). Eachconfigure()call replaces the previous configuration, and reconfiguring the Babel plugin no longer keeps units and state aliases removed from its config. The Babel plugin also re-applies its configuration before each file when another build-time configuration in the same process (another output,withTastyNext(),/zeroconfigure()) replaced it.
Patch Changes
-
#385
7dc285eThanks @tenphi! - Fix two ways ananimationcould silently fail to run:- camelCase names were lowercased. The style parser folds values to lowercase, so
animation: 'fadeIn 1s'emittedfadein, which matched neither@keyframes fadeInnor the hashed name of a local@keyframes.animationandanimationNamenow keep each name's authored case; durations, timing functions and keywords are still parsed as before. - A name after
steps(n, end)was missed. Name detection split the value at every comma and pickedend(orstart) out of the timing function, so in'1s steps(4, end) spin'the local@keyframes spinwas never emitted or renamed. Lists now split at top-level commas only, and function arguments are never read as names.
- camelCase names were lowercased. The style parser folds values to lowercase, so
-
#385
7dc285eThanks @tenphi! - Fix selector-mode styles (useGlobalStyles,globalStylesinconfigure(),tastyStatic(selector, …),extractStylesForSelector):@startingvalues are wrapped in@starting-styleinstead of being emitted as a plain rule that applied permanently.- Tokens and other styles whose states use
@root()on a selector that is the root itself (:root,html,:where(:root)) now attach the states to it (:root:where([data-schema="dark"])) instead of requiring a root inside the root, which never matched. This includes theme tokens defined inconfigure({ tokens }). - Local
@keyframes(and configuredkeyframes) used by ananimationare emitted alongside the rules, under the name the declaration is rewritten to. - A selector list such as
'.card, .panel'gives every item its states and sub-elements, not only the last one. Surrounding whitespace and empty list items are ignored, so'.card 'no longer turns states into a descendant selector. - Build-time
@keyframessteps follow Tasty style semantics, as they do at runtime: units, color tokens and$properties produce valid CSS, the custom properties set by local@keyframesget their@propertytypes inferred, and style names map like everywhere else in Tasty (fillbecomesbackground-color). - Build-time animation renaming no longer rewrites names inside longer ones (
spininspin-fast) or custom properties such as--my-animation. - In React Server Components, CSS queued by standalone style functions is no longer dropped when the next component renders no class.