Replies: 1 comment 1 reply
-
You can also enable arbitrary values yourself: @utility bg-clip-* {
background-clip: --value([*]);
} <div
class="
m-4 w-[200px] border-solid border-[10px] border-transparent p-[20px] rounded-[20px]
bg-[image:linear-gradient(white,white),linear-gradient(to_right,cyan,lime)]
bg-origin-border bg-clip-[padding-box,border-box]
"
>
This element is surrounded by a border image with rounded corners!
</div> However, I think this really should work by default, right? |
Beta Was this translation helpful? Give feedback.
1 reply
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.
-
The MDN example with border image uses multiple values for bg clip:
Tailwindcss doesn't have a way to provide multiple values for background clip.
❌
bg-clip-[padding-box,border-box]
- ignored❌
bg-[clip:padding-box,border-box]
- converted tobackground-color:padding-box,border-box
The only way for now is
[background-clip:padding-box,border-box]
.Would be helpful to have generic ways to set multiple values as
foo-[bar:baz,qux]
andfoo-bar-[baz,qux]
.Beta Was this translation helpful? Give feedback.
All reactions