Replies: 2 comments
-
Try with this: $utilities: map-merge(
$utilities,
(
'rotate': (
property: transform,
class: rotate,
values: (
0: rotate(0deg),
1: rotate(1deg),
2: rotate(2deg),
3: rotate(3deg),
),
),
)
); The e.g. Map of values $utilities: (
'opacity': (
property: opacity,
values: (
0: 0,
25: 0.25,
50: 0.5,
75: 0.75,
100: 1,
),
),
); Produces .opacity-0 { opacity: 0; }
.opacity-25 { opacity: .25; }
.opacity-50 { opacity: .5; }
.opacity-75 { opacity: .75; }
.opacity-100 { opacity: 1; } e.g. List of values $utilities: map-merge(
$utilities,
(
'cursor': (
property: cursor,
class: cursor,
values: auto pointer grab,
),
)
); Produces .cursor-auto { cursor: auto; }
.cursor-pointer { cursor: pointer; }
.cursor-grab { cursor: grab; } |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thank you for your reply. Yes, i know how the "normal" utilities work. I was just wondering how more "complex" things can be done with this, like converting |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello!
I'm asking myself if there a good way to build an utility like the example below. So basically is there a way to wrap the values into
rotate()
, or do i have to put everything into the values list?Expected output:
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions