Releases: brattonross/windy-radix-palette
v2.0.0-beta.7
Fixes an issue with the v2.0.0-beta.6 published package.
v2.0.0-beta.6
What's Changed
- fix: use color step when aliasing scale by @brattonross in #28
Full Changelog: v2.0.0-beta.5...v2.0.0-beta.6
v2.0.0-beta.5
- Removes some development logging that was left in the production build
v2.0.0-beta.4
Bug Fixes
- Dark mode config is now respected correctly when generating aliases
Features
Tailwind's theme
function is now used internally when generating aliases, meaning that existing Tailwind color config is respected when calculating the value of an alias.
For example, the following config would previously have always generated the bg
color using the literal gray 1 color from Radix. This can be frustrating when you have an existing alias that you want re-used, because you'd have to either remember to change the bg
alias to also use slate, or pull the value out into a variable.
With this release, we delegate the lookup to Tailwind instead, so gray.1
will be resolved to the slate 1 color from Radix, based on the alias of gray
for slate
.
const { createPlugin } = require("windy-radix-palette");
const colors = createPlugin();
module.exports = {
theme: {
extend: {
gray: colors.alias("slate"),
bg: colors.alias({ light: "white", dark: "gray.1" }),
},
},
plugins: [colors.plugin],
};
v2.0.0-beta.3
Breaking Changes
alias
no longer accepts the color step as a separate argument, instead use the format<color>.<step>
, e.g.alias("red", 12)
now becomesalias("red.12")
Features
The main focus of this release has been aliasing, with the big new addition being support for mutable aliases.
Previously, in order to create a mutable alias, you'd need to create your own CSS variable that points to a Radix Color variable, and then extend your color config to point at that variable. Whilst this wasn't bad, it meant that you had to be aware of, and directly reference CSS variables generated by this plugin. That could be an issue if we ever decide to change how these are named.
With this release, it is now possible to create mutable aliases directly in Tailwind config, and without having to know about any internals!
[email protected]
- The package has been switched from a Tailwind plugin to a preset
- All colors are now supported, not just gray scales
v2.0.0-beta.2
Fixes an issue with dark mode detection for strings
v2.0.0-beta.1
What's Changed
- fix: respect dark mode config by @brattonross in #26
Full Changelog: v2.0.0-beta.0...v2.0.0-beta.1
v2.0.0-beta.0
- Plugin API has been reworked to provide support for P3 colors out-of-the-box.
- Tailwind opacity modifier support is now disabled by default, but can be optionally enabled, at the cost of less P3 color support
[email protected]
I've decided to make this release v1.0.0, as I've been using this package in my own projects for some time without issue. It also felt like a good time to go v1 since Radix Colors just released v3.
There are breaking changes between v0.x and v1:
- Minimum supported Radix Colors version is now v3, if you depend on Radix Colors <=2.x then you'll need to use v0.6.1
- The helper functions
toRadixVar
andtoRadixVars
that were exported fromwindy-radix-palette/vars
have been moved and renamed. Now, a singlealias
function is exported directly from thewindy-radix-palette
module. It has the same API as both functions combined, so it should mean just a find and replace