Bug Tracker

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#14049 closed bug (fixed)

-webkit-order doesn't work with css()

Reported by: alex.latchford@… Owned by: alex.latchford@…
Priority: low Milestone: 1.10.2/2.0.3
Component: css Version: 1.10.1
Keywords: Cc:
Blocked by: Blocking:

Description

Hello,

Mocked up a demo: http://jsfiddle.net/BsYqC/

Click the third div, you'll see it change colour but not order.

Thanks, Alex

Change History (8)

comment:1 Changed 4 years ago by jasonmerino

Here is a test case that I think is a little more accurate for testing.

http://jsfiddle.net/jasonmerino/BsYqC/1/

It looks like internally the vendorPropName() method handles the vendor prefixing well enough, so you don't have to include the "-webkit-" portion, but the value for the CSS order property (-2 in this case) gets "px" added to it because the cssNumber object doesn't contain "order": true.

Being a jQuery core newb I may be missing something, but I feel like this is a pretty simple fix and would be happy to make the change and submit a pull request.

comment:2 Changed 4 years ago by dmethvin

Seems like your diagnosis is correct. I don't think we'd want to add the exception inside jQuery until or unless this property is a CSS standard one. It looks like it's part of the flexbox standard. Do you know if it's part of the latest official standard, or is it part of one of the older revs?

comment:3 Changed 4 years ago by timmywil

Owner: set to alex.latchford@…
Status: newpending

comment:4 in reply to:  2 Changed 4 years ago by alex.latchford@…

Status: pendingnew

Replying to dmethvin:

Seems like your diagnosis is correct. I don't think we'd want to add the exception inside jQuery until or unless this property is a CSS standard one. It looks like it's part of the flexbox standard. Do you know if it's part of the latest official standard, or is it part of one of the older revs?

Hi Dave,

As far as I'm aware it is the correct syntax (albeit browser prefixed) that is in the latest revision of the specification for flexbox. http://dev.w3.org/csswg/css-flexbox/#order-property http://www.w3.org/TR/css3-flexbox/#order-property

Thanks, Alex

comment:5 Changed 4 years ago by timmywil

Component: unfiledcss
Milestone: None1.11/2.1
Priority: undecidedlow
Status: newpending

This seems valid and easy to fix.

comment:6 Changed 4 years ago by jasonmerino

Hope I'm following correct protocol here. Just submitted a pull request with a fix for this issue: https://github.com/jquery/jquery/pull/1300

comment:7 Changed 4 years ago by Jason Merino

Resolution: fixed
Status: pendingclosed

Fixes #14049: don't append px to CSS order value. Close gh-1300.

Changeset: ec6eb38c64aadd6860c402cc0894c77b82b1a65d

comment:8 Changed 4 years ago by dmethvin

Milestone: 1.11/2.11.10.2/2.0.3
Note: See TracTickets for help on using tickets.