You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However this isn't really flexible since it would apply this as well for all and if you want to apply something for medium or lower, you suddenly have no way of doing so.
So mirror everything but add max in addition to min. And for backwards compatibility, we just keep the sm: with the sm-min. Plus we need the flex-none for max as well.
Also I would propose a quick addition to flex as well:
Flex-2
Flex-3
Flex-4
Flex-5
Flex-6
Flex-7
Flex-8
Flex-9
Flex-10
Flex-11
Flex-12
(perhaps more?)
To these as well, since its weird that you do allow flexbox but don't allow reshaping of columns in this library. Somehow you do have that list for flex-order-x, but not for just flex? I also don't get why you have !important everywhere. Thats not good practice and not necessary for most people either. But thats a different can of worms I don't really want to talk about for now.
So eventually with everything combined it would result in this:
Of course you can use mixins as well, but I felt that it would be a little more clear on what it would generate.
With this change it would make it easier for people to get flexbox up and running like they want, instead of being a little different than other frameworks with how they work. I get that you have mobile-first, but even with max width, that wouldn't mean that it never makes sense to do it like this.
The text was updated successfully, but these errors were encountered:
Martinspire
changed the title
Support extend flex and support minimum ánd maximum width in responsive classes
Extend flex and support both minimum ánd maximum width in responsive classes
Mar 18, 2024
Stumbled upon this as well. Currently there is no way to apply class "only on small screens" for example. Whole system is inverted and prioritizes mobile devices.
Right now the responsive sm/md/lg classes add this to the CSS:
would be for
flex sm:flex-1
However this isn't really flexible since it would apply this as well for all and if you want to apply something for medium or lower, you suddenly have no way of doing so.
My proposal is to add the following:
So mirror everything but add max in addition to min. And for backwards compatibility, we just keep the
sm:
with thesm-min
. Plus we need the flex-none for max as well.Also I would propose a quick addition to flex as well:
To these as well, since its weird that you do allow flexbox but don't allow reshaping of columns in this library. Somehow you do have that list for
flex-order-x
, but not for justflex
? I also don't get why you have !important everywhere. Thats not good practice and not necessary for most people either. But thats a different can of worms I don't really want to talk about for now.So eventually with everything combined it would result in this:
Of course you can use mixins as well, but I felt that it would be a little more clear on what it would generate.
With this change it would make it easier for people to get flexbox up and running like they want, instead of being a little different than other frameworks with how they work. I get that you have mobile-first, but even with max width, that wouldn't mean that it never makes sense to do it like this.
The text was updated successfully, but these errors were encountered: