-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
[refs #52] Add order utility #693
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
Conversation
|
I want help and explanations, I don't understand error when I run |
|
Hey @florianbouvot! It's saying you don't need quotes around the Will need to update the text fixtures in Going to keep this open for now as I want to think through the default values a bit, thanks for the contribution though! |
|
@adamwathan anything we can do to help get this merged in? |
|
Not focused on new features right now, so just not prioritizing stuff like this until 1.1 👍🏻 |
|
We can add this for 1.0 I think, just trying to think on the values that make sense. Maybe these to match the available default precentage widths? order: {
first: '-1',
last: '999',
none: '0',
'1': '1',
'2': '2',
'3': '3',
'4': '4',
'5': '5',
'6': '6',
'7': '7',
'8': '8',
'9': '9',
'10': '10',
'11': '11',
'12': '12',
}, |
|
Haha did you need order utilities on a project? ;P Yeah I think those values are good! At least the first four are really useful, and then 2-12 would be useful if you want to have a fully custom and explicit order for 12 columns when they collapse. |
|
Haha still haven't needed them honestly but I know they are useful 👍 |
|
Imho both Also not sure For the other 10% of cases, having |
|
I totally agree with @hacknug. |
@hacknug Yeah interesting point, I agree the 1-12 stuff is not as useful as it sounds, mostly because of the fact that you have to add an order to every element for them to really do anything. A bit conflicted because Bootstrap has 1-12 and I think it's not unreasonable to include them, and even though having multiple negative values and multiple positive values designed in a way that's completely disconnected from any sort of "grid" probably saves you a little bit of effort, it is a bit confusing to wrap your head around at the beginning. I had to think about it for a few minutes to even understand what you were proposing or why it was useful, haha... At the same time it's also confusing when you try to apply What's the complete scale you think makes the most sense? |
|
I'd personally go with a combo of what @florianbouvot, @benface and I proposed on #52: .order-first { order: -9999; }
.order-last { order: 9999; }
.order-none { order: 0; }Went with 9999 because of As I said this covers almost every scenario where I've had to use
Agree this might be confusing the first time you use it, but once you understand the default value is The alternative would be setting You'd end up with more Just like you've said no to some extra defaults or new features in the past, I think we can simply ship those 3 classes by default and reconsider in case someone can prove there's a use case for that. I'm not opposed to having them, I just find them unnecessary and counter-intuitive because of what you already mentioned. In case we want to ship more than those 3 classes, I'd go with a 50-50 positive/negative split. In that case we'd either have 12+12+3 classes or completely abandon the 12-column Bootstrap thing. |
|
I agree with everything @hacknug said. 👍 |
|
@adamwathan do you accept to change the values before v1.0 ? |
|
I think I'm going to change |
|
@adamwathan |
|
It also changes the order of the whole thing™ instead of just one of those elements. |
Hi @adamwathan,
Following flexbox split, I propose to think about adding
orderutility (issue #52).Best regards, Florian.