You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If enabled, automatic dark colors are generated for each light color (eg no dark: variant is present). This feature is opt-in and twind provides a builtin function that works with tailwind color palettes (50, 100, 200, ..., 800, 900).
import{autoDarkColor}from'twind'defineConfig({// for tailwind color palettes: 50 -> 900, 100 -> 800, ..., 800 -> 100, 900 -> 50darkColor: autoDarkColor,// other possible implementationsdarkColor: (section,key,{ theme })=>theme(`${section}.${key}-dark`)asColorValue,darkColor: (section,key,{ theme })=>theme(`dark.${section}.${key}`)asColorValue,darkColor: (section,key,{ theme })=>theme(`${section}.dark.${key}`)asColorValue,darkColor: (section,key,context,lightColor)=>generateDarkColor(lightColor),})
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
a new pre-release is availabe: 1.0.0-next.36
@twind/preset-ext
_
eg&_span:underline
; can be combined with other selectors&_h1>span~a:underline
(cbd37a10
)8f1288a0
)@twind/preset-tailwind
--tw-<...>
) from preset-tailwind into core — this allows var hashing without the tailwind preset (ae979d12
)text-decoration-line
(346efc4e
)@twind/preset-tailwind-forms
text-decoration-line
(346efc4e
)@twind/preset-typography
e3796bf9
)text-decoration-line
(346efc4e
)twind
relax some typings where the actual generic type does not matter (
28cbaef5
)fix: ensure colors DEFAULT values override nested objects (
43d61076
)refactor: include full precendence in resume data (
80ce410a
)fix: move styles generated by
animation()
intocomponents
layer — this allows to override animation properties using utilities (39b45125
)feat: auto dark colors (
2f8f69d2
)If enabled, automatic dark colors are generated for each light color (eg no
dark:
variant is present). This feature is opt-in and twind provides a builtin function that works with tailwind color palettes (50
,100
,200
, ...,800
,900
).Example css for
text-gray-900
:The auto-generated dark color can be overridden by the usual
dark:...
variant:text-gray-900 dark:text-gray-100
.fix: handle color function in replacement for
theme(...)
(9fc5baec
)fix: always use rgba color (
aaad7e44
)refactor: move hashing of vars (
--tw-<...>
) from preset-tailwind into core — this allows var hashing without the tailwind preset (ae979d12
)fix: prevent double class name hashing (
fc9b0c27
)fix: use
text-decoration-line
(346efc4e
)fix: ensure theme returns all sections (
8bbc2a42
)fix: use same color section detection (
8dfd105b
)@twind/with-next
28cbaef5
)This discussion was created from the release v1.0.0-next.36.
Beta Was this translation helpful? Give feedback.
All reactions