Skip to content

1.5.0

Compare
Choose a tag to compare
@ben-rogerson ben-rogerson released this 05 Jul 00:44
· 761 commits to master since this release

More new variants

Seven new variants were added thanks to @phil-scott-78:

tw`first-of-type:flex` // :first-of-type {...}
tw`last-of-type:flex` // :last-of-type {...}
tw`odd-of-type:flex` // :nth-of-type(odd) {...}
tw`even-of-type:flex` // :nth-of-type(even) {...}
tw`not-first-of-type:flex` // :not(:first-of-type) {...}
tw`not-last-of-type:flex`  // :not(:last-of-type) {...}
tw`not-only-of-type:flex` // :not(:only-of-type) {...}

Check out the full list of variants →

Add plugin debug mode

By adding debugPlugins: true to your config you'll see a list of classes and the css your plugins are creating.
Visualising this data really helps iron out bugs when you're adding or editing plugins.
The feedback will only display in dev.

image

Improved plugin support

After finding I missed support for a bunch of selectors in plugins using addComponents I've now fixed the holes.
This tackles #97 and #96 - thanks @fvanwijk for raising the issues.

New Goober preset

Adding preset: 'goober' to your config will switch to Goober imports.
At the moment, you can only use it with goober@next.
This is a bit of a soft launch - I'll make a bigger deal of it when I release a guide on using Goober with Twin.

New sassy psuedo config option

Some css-in-js libraries like Goober support the sass way of adding pseudo selectors.
So &:hover vs :hover.

I've added a config option: sassyPseudo: true which will automatically add the ampersand.
This is turned on with the new preset: 'goober' config option above.

Other

  • Plugin speed improvements