Bug 147489 - Web Inspector: Add px when changing number value
Summary: Web Inspector: Add px when changing number value
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-07-31 08:15 PDT by Tomas
Modified: 2016-09-10 12:55 PDT (History)
8 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas 2015-07-31 08:15:53 PDT
Web Inspector CSS sidebar:
When decreasing/increasing value from "0" to another value, add "px" unit.

Example: (| means cursor)
body {
    padding: 0|;
}

ALT + Up arrow key

Expected result:
body {
    padding: 1|px;
}
Comment 1 David Kilzer (:ddkilzer) 2016-09-09 11:18:04 PDT
<rdar://problem/28228697>
Comment 2 BJ Burg 2016-09-10 00:59:21 PDT
There is no way to do this unambiguously. The user could prefer ems or some other numerical unit.
Comment 3 Nikita Vasilyev 2016-09-10 12:55:49 PDT
(In reply to comment #2)
> There is no way to do this unambiguously. The user could prefer ems or some
> other numerical unit.

"px" is the most commonly used unit, so I can see why would somebody want that.

However, it's not very straightforward to implement. For

   z-index: 0

we don't want to append "px". `z-index: 1px` isn't a valid CSS.
To implement this properly we'd have to understand the context.