Releases: tenphi/tasty
v2.2.0
Minor Changes
- #156
552c522Thanks @tenphi! - Pseudo-element and pseudo-class patterns in the$selector affix now require an explicit&prefix to attach to the root selector.$: '::before'must be written as$: '&::before'. Without&, pseudo patterns are treated as descendant selectors.
Patch Changes
v2.1.2
Patch Changes
-
#150
f8f0285Thanks @tenphi! - Fix excessive CSS output for compound root states by canonicalizing @media order, removing redundant boolean selectors, improving negation subsumption, and pruning contradicted OR branches. -
#152
856a7baThanks @tenphi! - Factor Cartesian-product:is()selector groups into independent per-dimension:is()groups for more compact CSS output.
v2.1.1
v2.1.0
Minor Changes
- #139
025dd2cThanks @tenphi! - Add Shadow DOM support:useStyles,useGlobalStyles, andcomputeStylesnow accept arootoption (Document | ShadowRoot) to inject styles into a specific shadow root. Styles are injected viaadoptedStyleSheetswhen targeting a shadow root, with a sharedChunkSheetRegistryfor deduplication across multiple shadow roots.
Patch Changes
v2.0.4
v2.0.3
Patch Changes
- #135
fa72fe1Thanks @tenphi! - Internal pipeline cleanup: refactorprocessStylesinto named per-stage helpers, splitmaterialize.ts(types + contradiction detection extracted tomaterialize-types.tsandmaterialize-contradictions.ts), document the actual stage flow indocs/pipeline.mdand theindex.tsheader (Stage 0 normalization, user-OR vs De Morgan-OR expansion, consensus rule,@starting-stylecascade ordering), and add tests for container style query rendering, explicit boolean-algebra laws, multi-variable consensus, De Morgan with mixed@supports/@container, empty-styles, and a known simplification gap for conflicting@root(schema=…)attribute values. No behavior change.
v2.0.2
v2.0.1
Patch Changes
bf19368Thanks @tenphi! - FixtastyDebugsorting of class names. The internalsortTastyClasseshelper still parsed class names as decimal integers, which silently produced unsorted output for the 2.0.0 base36 hash format (e.g.t3a5f). It now sorts lexicographically, restoring stable ordering intastyDebug.cache(),tastyDebug.summary(), and related outputs.
v2.0.0
Major Changes
-
#123
f26409eThanks @tenphi! - Unified hash-based class names across RSC, SSR, and client. Same cache key now produces the same class name in all environments, enabling cross-environment style deduplication. Replaces the heavy SSRCacheState transfer with a lightweight class-name-list viawindow.__TASTY__.SSR/RSC fixes included:
- Fix missing tokens on pages without RSC-rendered tasty components. The
globalThis.__tasty_rsc_internals_emitted__flag leaked across requests in the same Node.js process; internals (tokens,@property,@font-face,@counter-style) are now emitted exclusively by the SSR collector. - Fix duplicate global CSS when RSC and SSR paths both emit internals in Next.js App Router. The SSR collector now skips internals already emitted by the RSC inline-style path.
- Fix CSS class name collisions during client-side navigation in Next.js App Router. RSC inline styles used sequential counters (
r0,r1, …) that reset on every request; replaced with content-based hashing (djb2) so identical content always maps to the same name. - Auto-skip global CSS injection on client when
<style data-tasty-ssr>is detected, eliminating the need fortypeof window === 'undefined'guards inconfigure()calls.
Internal SSR API changes (not part of the public API):
SSRCacheStatetype removed — replaced by plainstring[]class lists.ServerStyleCollector.getCacheState()replaced bygetRenderedClassNames().window.__TASTY_SSR_CACHE__replaced bywindow.__TASTY__.hydrateTastyCache()deprecated in favor ofhydrateTastyClasses()(the old function still works as a compat shim).- Class name format changed from
t{number}tot{base36hash}.
- Fix missing tokens on pages without RSC-rendered tasty components. The
Minor Changes
- #119
af8bf8aThanks @tenphi! - AddpresetsandglobalStylesoptions toconfigure().presetsis a shorthand forgenerateTypographyTokens()that merges generated tokens under explicittokens.globalStylesis aRecord<string, Styles>that applies Tasty styles to arbitrary CSS selectors across all rendering modes. Both options are also available in plugins and zero-runtime config. Typography preset fields now accept state maps for responsive/theme-aware values.
Patch Changes
-
#119
8a7a342Thanks @tenphi! - DeriveTastyZeroConfigfromTastyConfigviaOmitto keep the two types in sync automatically. This also widensTastyZeroConfigto acceptcolorSpace,properties, andbooleanvalues inreplaceTokens— options that were previously only available in the runtime config. -
#123
841767cThanks @tenphi! - Fix overlapping and duplicate CSS selectors produced by the condition simplifier.- Fix overlapping selectors when default and custom-state token values coincide but other state values differ.
- Fix overlapping selectors for compound state tokens by adding consensus resolution and making inner OR branches exclusive during CSS materialization.
- Fix complementary factoring for compound state conditions, eliminating duplicate selectors when token values match across state combinations.
- Eliminate duplicate token CSS rules when multiple states map to the same value. Tokens now generate a single rule instead of redundant duplicates. Also fixes absorption law so
A | (A & B)correctly simplifies toAregardless of condition complexity.
-
#119
a642337Thanks @tenphi! - Change defaultletterSpacingin typography presets from'0'to'normal'. The previous default could override inherited letter-spacing;'normal'matches the browser default.