Bug Tracker

Ticket #14049 (closed bug: fixed)

Opened 18 months ago

Last modified 18 months ago

-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:
Blocking: Blocked by:

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

comment:1 Changed 18 months 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 follow-up: ↓ 4 Changed 18 months 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 18 months ago by timmywil

  • Owner set to alex.latchford@…
  • Status changed from new to pending

comment:4 in reply to: ↑ 2 Changed 18 months ago by alex.latchford@…

  • Status changed from pending to new

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 18 months ago by timmywil

  • Priority changed from undecided to low
  • Status changed from new to pending
  • Component changed from unfiled to css
  • Milestone changed from None to 1.11/2.1

This seems valid and easy to fix.

comment:6 Changed 18 months 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 18 months ago by Jason Merino

  • Status changed from pending to closed
  • Resolution set to fixed

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

Changeset: ec6eb38c64aadd6860c402cc0894c77b82b1a65d

comment:8 Changed 18 months ago by dmethvin

  • Milestone changed from 1.11/2.1 to 1.10.2/2.0.3
Note: See TracTickets for help on using tickets.