Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Stop appendingpx to everything except a blocklist? #2795

Closed
Assignees
mgol
Milestone
@mgol

Description

@mgol

We're currently appendingpx when using the.css() setter if the value given is numeric and the CSS property is not on thejQuery.cssNumber list.

From#2793 (comment):

This is a mess, we're adding more & more stuff to this array and it'll always be a problem as CSS is expanding. I'd like to get rid of thispx-appending but it might be too big a breaking change.

This is probably too late for 3.0 but how about switching the blacklist to a whitelist? If jQuery doesn't appendpx for you it's easier to fix by yourself than if it does append erroneously. My guess would be 99% of the uses are common properties like(min-|max-|)(height|width) ortop,left etc. We could identify those most popular ones and appendpx only to them. Migrate could restore the previous behavior but warn if someone passes a numeric value to properties that are not on the current blacklist.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp