stevecochrane / tailwindcss-logical

A CSS Logical Properties and Values plugin for Tailwind CSS.
https://stevecochrane.github.io/tailwindcss-logical/
ISC License
172 stars 2 forks source link

Logical Gradients #30

Closed crswll closed 2 years ago

crswll commented 2 years ago

Great plugin! I was just about to write the same thing but was fortunate enough to Google "tailwind logical".

One thing I had in mind was logical gradients (like bg-gradient-to-is). I was able to do rtl pretty easily but not sure exactly how to approach others.

I hacked up this playground to show my thought process and wanted your opinion before opening a PR for it: https://play.tailwindcss.com/7SJNdRKEZb?file=config

crswll commented 2 years ago

Actually just realized it shouldn't switch vertical direction with rtl. Will adjust that later.

stevecochrane commented 2 years ago

Hi @crswll, thank you very much for the kind words! I'm glad to hear that this is useful for you.

I'm a bit conflicted about this, because while I do think it could be really useful to have support for logical gradients, I also think it falls outside the scope of this plugin, for the time being at least. My goal is to support everything in the W3C's CSS Logical Properties and Values spec, because that gives the plugin a clear purpose and it's easy to understand. So because there isn't anything official for logical gradients yet, I think I need to rule gradients out, I'm sorry to say.

That said, if you want to make your own plugin, I'd be glad to link to it in the readme as a resource for anyone else who might be interested.

crswll commented 2 years ago

That makes sense to me. I wonder if it's being worked on officially to support something like to end. If the mood strikes me today I'll hack it up. Thanks for taking a look!