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

RESOLVED DUPLICATE of bug 715888

Status

DevTools
Inspector
RESOLVED DUPLICATE of bug 715888
4 years ago
a month ago

People

(Reporter: Volker E., Unassigned)

Tracking

34 Branch
x86_64
Windows 7

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

4 years ago
Created attachment 8550651 [details]
firefox-developer-tools_v34_length_unit_value_0_display_test.html

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

Comment 1

3 years ago
Dup of another bug; part of the as-authored project.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 715888

Updated

a month ago
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.