Update dependency twin.macro to v2.8.2 #101
Open
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.4.2
->2.8.2
Release Notes
ben-rogerson/twin.macro
v2.8.2
Compare Source
This patch contains a few changes for those using the
styled-components
preset.The css prop can now be added with
babel-plugin-styled-components
- Setup info →styled
import presetThe default import was changed from
import "styled-components/macro"
toimport "styled-components"
- More info →Edit: Try the new
rc
with the latest changesnpm i twin.macro@rc
v2.8.1
Compare Source
v2.8.0
: The Arbitrary Variants releaseCompare Source
🌟 New: Arbitrary Variants (#546)
The star feature of this release is the addition of a new variant that creates a custom selector for classes.
Usage is easy, just add the selector within square brackets and prefix it on any class (or round-bracketed set):
Before this feature, the styling above would need help from the css prop:
There are a wide range of uses for Arbitrary Variants:
I hope you enjoy using this powerful feature!
🐛 Bugfixes
<Menu.Item tw="block">
) (#534)bg-color
classes from trumpingbg-opacity-x
classes (#552)peer
class is used as a tailwind class (#551):root
usingaddBase
in plugins (#521)container
class (#518)v2.7.0
: The JIT releaseCompare Source
This release brings the same special features we all love from the Tailwind JIT release! (v2.2.0-2.2.7) 🎉🌮
As this is the same feature set as Tailwind, you can read some more information about each feature in the Tailwind release notes.
Larger features
A bunch of new variants
peer-*:
variants for styling sibling elements (PR)first-letter:
andfirst-line:
pseudo-elements (PR)selection:
for styling text selections (PR)marker:
for styling list markers (PR)autofill:
,in-range:
,out-of-range:
,first-letter:
,first-line:
,only:
,empty:
,selection:
,marker:
,rtl:
andltr:
(PR)Check the variant config for a full list →
Shorthand color opacity syntax (PR)
Add a slash opacity value to set the opacity on any color classes:
This slash value comes from your opacity setting in your tailwind config.
For custom slash opacity values, use square brackets:
Extended arbitrary value support (PR)
The "dash square bracket" syntax adds custom values on just about every dynamic class (like
bg-[xxx]
, notblock
):This feature almost replace twin's "short css" feature but short css is still great for more obscure css as you can specify custom properties too:
Per-side border color utilities (PR)
You can now specify border color and border width on a specific border direction:
Smaller features
before:
andafter:
variants now automatically addcontent: ''
(PR)No more requirement for the
content
class every time we use pseudo classesNow there's no need to add
transform
orfilter
to make your actual transform or filter classes work (Possible breaking change - check Adams PR notes)transform-cpu
classThis class uses
translateX
andtranslateY
instead oftranslate3d
which is added bytransform-gpu
Classes for controlling how an element's background is positioned relative to borders, padding, and content - Docs
Specify the color of the carat in textareas/inputs/contenteditables (eg:
tw`caret-red-500`
)Support
If you’re kicking ass with twin - especially if you’re in a team - then please consider becoming a sponsor.
It will really help out with the continued development of twin - cheers! 🍻
v2.6.2
Compare Source
v2.6.1
Compare Source
v2.5.0
: Arbitrary values, screen import and important prefixCompare Source
New: Arbitrary values (#447)
Twin now supports the same arbitrary values syntax popularized by Tailwind’s jit ("Just-in-Time") mode.
This is a great way to add once-off values that don’t need to be in your tailwind config.
Read more about arbitrary values →
New: Important prefix (#449)
Also from Tailwind JIT, is the bang
!
prefix to add important styles:Twin will continue to support a bang at the end of the class too - so you've got a couple of options.
See the pr for more info →
New: Screen import (#408)
The screen import creates media queries for custom css that sync with your tailwind config screen values (sm, md, lg, etc).
Usage with the css prop
Usage with styled components
Read more about the screen import →
Bugfixes
[divide/space]-[x-/y-]reverse
(#359)Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), 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.