elevation.sass / shadows / colors #18117
Unanswered
florin-rotaru-md
asked this question in
Ideas / Proposals
Replies: 1 comment 1 reply
-
|
Have a look at UnoCSS or check out the preset I created for Quasar. You can get all the flexibility you need by creating a UnoCSS rule with your desired CSS output. |
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.
-
💡 Enhancement Idea: Make Shadow Utilities Even More Awesome
Hey Quasar team! 👋
First off, love what you've built with Quasar - it's such a joy to work with! I've been diving into the shadow utilities lately and had an idea that could make them even more flexible and developer-friendly.
What I Noticed
While exploring the codebase, I saw that the shadow utilities are generated like this:
https://github.com/quasarframework/quasar/blob/dev/ui/src/css/core/elevation.sass
This works perfectly for the default setup, but I thought - what if we could make this even more dynamic?
The Idea 💭
What if we changed that
24tolength($shadows)? Something like:Why This Could Be Great 🌟
For Bundle Size Enthusiasts: Developers working on lightweight apps could define just the shadows they need (maybe only 3-5 levels) and automatically get smaller CSS bundles. Less is more, right?
For Design System Teams: They could perfectly match their shadow utilities to their actual design tokens - no more, no less.
For the Curious: Some teams might even want to experiment with more than 24 shadow levels for specific design needs.
For Everyone: It just feels more "Quasar-like" - flexible, smart, and respecting what developers actually want to do!
Real-World Example
Imagine a team that only uses shadows for cards and modals. They could do:
And .... only
.shadow-1,.shadow-2,.shadow-3, and.shadow-4get generated. Clean bundle, happy developers! 🎉🎨 Similar Opportunity with Colors?
While we're on the topic of making things more dynamic, I noticed something similar might apply to color utilities!
Imagine developers being able to:
Just a thought - if the shadow approach works well, colors might be another great area!
What do you think?
I'd love to hear your thoughts on this!
Beta Was this translation helpful? Give feedback.
All reactions