Skip to content
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

-webkit-box-ordinal-group val+1? #1

Closed
trinonsense opened this issue Jul 18, 2013 · 4 comments
Closed

-webkit-box-ordinal-group val+1? #1

trinonsense opened this issue Jul 18, 2013 · 4 comments

Comments

@trinonsense
Copy link

why is -webkit-box-ordinal-group (ln 132) incremented the value by one, while the others don't?

@mastastealth
Copy link
Owner

The older syntax (box-ordinal-group) starts counting from 1, while the newer syntax (order) starts from 0.

@trinonsense
Copy link
Author

mm can you point me to articles supporting this idea?

I see that -webkit-box-ordinal-group initial value is 1, and other browsers at 0, but the way I read it, it may not mean it shifts the group order counting. To me, it looks like, initially, older webkit browsers set the element order group in 1, but if it's set to any other int, webkit and other browsers would order it to that same int grouping.

I just haven't been able to find any articles saying about this, so let me know what I thought is incorrect. Thanks.

@mastastealth
Copy link
Owner

Ok, so the W3C articles you might of come across...
Old: http://www.w3.org/TR/2009/WD-css3-flexbox-20090723/#displayorder (box-ordinal-group, initial 1)
New: http://www.w3.org/TR/css3-flexbox/#order-property (order, initial 0)

The real problem with box-ordinal-group is:

This property is a natural number value with an initial value is 1.

You can see on the http://the-echoplex.net/flexyboxes/ tool that order is always +1 of box-ordinal-group. There is the case that the user can use negative numbers for order, in which case, the older syntax will fail, however as long as they stick to 0+ order will work fine, and the +1 will prevent the fallback from failing. I should probably add a note for that, as I don't think there's any way to full proof the fallback for negative.

@trinonsense
Copy link
Author

Okay, yeah, I tested it out for myself. Chrome doesn't computed 0, but otherwise for 1. Thanks for the clear up!

No!
screen shot 2013-07-20 at 10 53 29 pm

Yes!
screen shot 2013-07-20 at 10 53 43 pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants