All packages have been update to 1.0.0-next.38
twind@1.0.0-next.38
Patch Changes
-
fix: replace escaped quotes within class names during SSR (
b212b52f
) -
Rewrites HTML entity & when self-referenced groups are used with (p)react (
782f93df
) 🙏🏽 @rschristian! -
feat: preserve classes created by explicit
tw
calls during SSR (fe88051d
)Previously
inline
andextract
cleared thetw
instance before parsing the html assuming that all classes are available viaclass
attributes. That led to missing styles frominjectGlobal
or explicittw
calls.This change introduces a
snaphot
method ontw
and sheet instances which allows to preserve the classes that are created by explicittw
calls.Default Mode (nothing changed here)
import { inline } from 'twind' function render() { return inline(renderApp()) }
Library Mode
import { tw, stringify } from 'twind' function render() { // remember global classes const restore = tw.snapshot() // generated html const html = renderApp() // create CSS const css = stringify(tw.target) // restore global classes restore() // inject as last element into the head return html.replace('</head>', `<style data-twind>${css}</style></head>`) }
-
fix: gradients with arbitrary color stop positions (#296) (
77954405
)