New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Css filter support #402
Css filter support #402
Conversation
b530c94
to
f6d9933
Compare
Awesoooome ! |
@ben-rogerson, what do you think of allowing arbitrary values, e.g., |
I'd like to add support for custom class values when twin gains support for tailwinds arbitrary values. The classes for a rotation will be: tw`transform rotate-[24deg]` Until then, you can use twins short css feature to specify any unique values: tw`transform[rotate(24deg)]` |
Thanks so much, @ben-rogerson! Follow-up: Is there any way to use background image URLs? tw`background-image[url(https://example.com/hello.jpg)]` |
@AnandChowdhary That snippet should add a background image, is it not working for you? Short css works with all css properties btw. If it's not working, perhaps try adding some single quotes around the path: tw`background-image[url('https://example.com/hello.jpg')]` |
Hi @ben-rogerson! Short css for background image does not seem to work. This is what I'm adding: tw`background-image[url('https://example.com/hello.jpg')]` The error I get during compilation:
|
@plibither8 looks like we need some escaping, try this: tw`background-image[url(https:/\/knowpathology.com.au/app/uploads/2018/07/Happy-Test-Screen-01-825x510.png)]` |
@ben-rogerson thanks for the quick response! Tried exactly this and still doesn't seem to work - same error as before 🤔. |
Could you add a new issue with the code you're attempting, cheers! |
I'm really enjoying using these new filters from tailwind.
It's so easy to pile heaps of them on a single element - though you'd probably want to check the perf after that.
Usage
Add a
filter
to activate the filter then use the actual filter class(es) next to it (order doesn't matter):Added
Filters:
Backdrop filters: