Closed Bug 1122852 Opened 9 years ago Closed 9 years ago

Dev Tools Inspector: CSS Rules Tab should not show length unit `px` when no length unit is given

Categories

(DevTools :: Inspector, defect)

34 Branch
x86_64
Windows 7
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 715888

People

(Reporter: open, Unassigned)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:34.0) Gecko/20100101 Firefox/34.0
Build ID: 20141125180439

Steps to reproduce:

When setting a CSS length value to `0`, Firefox Developer Tools shows it in the Rules Tab as `0px`. Even if all other values in the same property are of a different length value like `5rem`.



Expected results:

As there is no default length unit from standards perspective, `px` should not be added to `0` values. Also mixing `px` into values of properties with different lenth unit confuses.

Citing from http://www.w3.org/TR/css3-values/#lengths
>> However, for zero lengths the unit identifier is optional (i.e. can be syntactically represented as the <number> ‘0’). 

In my opinion adding it also gives the wrong perception that a length unit is necessary, which at very large projects with several hundred lines of CSS code would even lead to a difference size-wise.
Component: Untriaged → Developer Tools: Inspector
Dup of another bug; part of the as-authored project.
Status: UNCONFIRMED → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: