Can we have something like calc(100vh - *rem) by default? #2421
Replies: 3 comments 2 replies
-
Hmm. You can do this easily via the Config and then use the built CSS as a CDN? If you have the ability to host a file that is. Here is a quick mock plugin for the classes you want (not tested):
Hopefully this helps! |
Beta Was this translation helpful? Give feedback.
-
This would work, but the problem is that in some projects we can't build it and we use external CDN like cdnjs.com. My main point was if we can add this kind of feature by default to the main project. IDK if it is just me, but I use this kind of feature alot. And I even noticed that the TailwindCSS main page use this. 😄 |
Beta Was this translation helpful? Give feedback.
-
@1sd15 we could host the build somewhere and used it, but if a new TailwindCSS version comes out, we always need to remember to build it again and deploy the build somewhere so we can use it... while I was wondering about that, I thought: "maybe someone is having this same issue, it would be nice if this feature was default in the project, so we don't need to do this every time TailwindCSS generate a new version" |
Beta Was this translation helpful? Give feedback.
-
I created some projects that I only needed to customize because I need this feature and I wished it existed by default because I could use something like CDN. Something like "h-screen-16" that would translate to "calc(100vh - 4rem)". Is this a bad idea for the project and I'm creating this layout with Tailwind in some bad way?
Beta Was this translation helpful? Give feedback.
All reactions