This repository has been archived by the owner on Aug 14, 2023. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^2.6.2
->^3.0.0
Release Notes
ben-rogerson/twin.macro (twin.macro)
v3.3.1
Compare Source
thanks to @albohlabs
Note: Twin will now autoload a
tailwind.config.ts
config file if found when atailwind.config.[.js/.cjs]
doesn't exist.v3.3.0
: v3.3Compare Source
🎉 This version adds support for tailwindcss@3.3.1 - enjoy!
Read the official tailwind release notes for info on all the new goodies.
Install twin and tailwind latest:
Fixed
v3.1.0
: v3.1Compare Source
@apply
support in plugins #770Develop tailwindcss plugins quickly using twin-supported classes.
@screen
inability to grab complex theme.screens values #763 - Thanks @minzojianpieces.some is not a function
error #767v3.0.1
Compare Source
This patch contains a fix for stitches:
animation-x
classes #758And mostly fixes for arbitrary variant usage:
[@page]:m-0
#759Reminder: Update tailwind to latest also or you'll probably see a
pieces.some is not a function
error:### `twin.macro@3.01` requires `tailwindcss@>=3.2.0` npm i twin.macro@latest tailwindcss@latest
v3.0.0
: v3.0: Support for tailwindcss v3.2.2+Compare Source
Release changes
Use new variants like
aria-xxx
,data-xxx
andmin-xxx
- check the official tailwindcss release posts for more infoIt's only taken three versions and a rewrite to achieve and now full plugin support is here!
tailwindcss
topeerDependencies
No more waiting for twin to support new Tailwind features, just update
tailwindcss
tailwind.config.js
https://github.com/ben-rogerson/twin.macro/pull/693not-
versions of many common variants, eg:not-empty:
,:not-focus:
,:not-required:
reftailwind.config.js
https://github.com/ben-rogerson/twin.macro/pull/693/693
config
- more at docs/configtailwind.config.cjs
has been added as a fallback ben-rogerson/twin.macro@9e7a7df!
prefix on groups, eg:first:!(block mt-5)
hasLogColors: false
to remove log coloring ben-rogerson/twin.macro@bbaec9dContainer queries
The new tailwind-container-queries plugin works with twin but there are some browser and version requirements:
Update notes
debugPlugins
was removed and rolled into another existing option:debug: true
container
has been aligned with tailwind - no longer has a custom margin valueShort Css deprecated
Twins custom "short css" has been deprecated in favour of Tailwind arbitrary properties:
Emotion error: Value for 'content' without quotes
In Emotion, using
before:
orafter:
variants may trigger a console error like this:Update one or both of the packages below to avoid this error (version is when error was fixed):
Arbitrary variants/properties without parent selectors
In arbitrary variants/properties without parent selectors, Twin now needs to add the parent selector for you in order to create a compatible class to run through tailwindcss.
If twin miscalculates where the parent selector should be added then you'll need to add the parent selector yourself.
Arbitrary variant escaping
Twin now replaces all spaces with underscores in arbitrary variants, so to keep any underscores in the output we can escape them:
General value escaping
Previously in many instances, escaping required a double backslash before the character (
\\
).Now we'll only need a single backslash:
Theme values/import and DEFAULT
When theme is used within an arbitrary value or property and there is a DEFAULT value found, the theme value will now return the default value automatically:
The theme import now won't return the
DEFAULT
option automatically.We can still select the DEFAULT value by specifying it, eg: theme
colors.black.DEFAULT
.This makes it possible to grab whole objects from the config without automatically returning the
DEFAULT
value:Daisy UI tailwind plugin
DaisyUI often styles their components based on classNames, eg:
.btn.loading { ... }
This means in some situations we have to add classNames to the jsx element to add their modifier styling
Some discussion here and at #760
Vite build issue
If you're noticing build issues after upgrading, try updating your Vite config with the updated build target:
Support
If you’re kicking ass with twin - especially if you’re in a team - then please consider supporting this project.
It will really help out with the continued development of twin - cheers! 🍻
Thanks
A huge thanks and shout out to all the
rc
contributors helping with features, fixes and bug testing over the past year - you folks are awesome 👋🙏@omaemae, @ChrisEbert, @Macksi, @atxiii, @mohammadsiyou, @MatthiasDunker, @lguima, @EduardoBautista, @HaidarEzio, @ajmnz
Full Changelog: ben-rogerson/twin.macro@2.8.2...3.0.0
Configuration
📅 Schedule: Branch creation - "after 6am and before 4pm every weekday" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.