-
Notifications
You must be signed in to change notification settings - Fork 59
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
[Feature request] $mq should work as a function #46
Comments
Hello,
Salute |
@AndrewBogdanovTSS I totally agree..I love this package but it's sometimes a nightmare to use. I often use these two patterns: ['xs','sm'].includes($mq)`
// and
!['md','lg','xl'].includes($mq) usage in templates like : <component :class="[{ 'someClass': ['xs'].includes($mq) }]" /> you can wrap those statements into computed properties and I've even considered writing a mixin or attaching them to the |
I guess the best solution would be a PR to this package 🙂 |
Yea! @AlexandreBonaventure doesn't seem to be responding to community efforts. There are 11 PRs waiting to be approved...maybe its time someone forks this to an actively-maintained repo...? |
Right now $mq is just a string - that is limiting its behavior significantly. I suggest to turn it into a function that could accept a string. That will enable
true
mobile-first experience. If an argument of specified breakpoint is passed - it should return true if it's currently within that breakpoint.If a minus is added to the string - it will also include every breakpoint below the specified one.
If a plus is added to the string - it will also include every breakpoint above the specified one. Something like:
The text was updated successfully, but these errors were encountered: