Decreasing a unitless value in the CSS panel of devtools adds `px` unit below 0
Categories
(DevTools :: Inspector: Rules, defect, P2)
Tracking
(firefox99 verified)
| Tracking | Status | |
|---|---|---|
| firefox99 | --- | verified |
People
(Reporter: nicolas, Assigned: jdescottes)
References
Details
Attachments
(2 files)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:97.0) Gecko/20100101 Firefox/97.0
Steps to reproduce:
- open devtools
- find a CSS property with a positive value without unit (
line-heightfor example, or a custom property) - decrease the value down to
0with0.1steps ([Option]+[↓]on macOS), and continue decreasing
Actual results:
- after going to negative values, Firefox adds a
pxunit
Expected results:
No unit should have been added (if the initial value was unitless), at least to properties that support unitless values like line-height) or custom properties.
It looks like it work for 1 steps, the issue is with 0.1 steps.
Comment 1•3 years ago
|
||
Took the liberty to triage into DevTools > Inspector: Rules.
Can confirm the issue in Nightly when using the step=-0.1 changes (Option+ArrowDown).
The step=1 step (ArrowDown) and step=10 (Shift+ArrowDown) don't seem affected.
Basic test case:
:root {
--custom: 0.5;
line-height: 1.4;
}
| Reporter | ||
Comment 2•3 years ago
|
||
Thanks Florens.
It looks like increasing the value from 0 with 0.1 steps has the same issue than decreasing.
| Assignee | ||
Comment 3•3 years ago
|
||
Thanks for the report and investigation :) Confirming the issue, will be triaged later this week!
Comment 4•3 years ago
|
||
The severity field is not set for this bug.
:jdescottes, could you have a look please?
For more information, please visit auto_nag documentation.
| Assignee | ||
Updated•3 years ago
|
| Assignee | ||
Comment 5•3 years ago
|
||
Comment 7•3 years ago
|
||
| bugherder | ||
Updated•3 years ago
|
Comment 8•3 years ago
|
||
Reproduced the issue on build 98.0a1 without fix on Mac 10.13. Could not reproduce on Win10, only on Mac.
Verified as fixed on Mac 10.13 using build 99.0 (20220328190900).
Updated•3 years ago
|
Description
•