Closed Bug 1940009 Opened 7 months ago Closed 7 months ago

Unit pt missing from Fonts tab in developer tools

Categories

(DevTools :: Inspector, enhancement, P3)

Firefox 131
enhancement

Tracking

(firefox136 fixed)

RESOLVED FIXED
136 Branch
Tracking Status
firefox136 --- fixed

People

(Reporter: ambrose.li, Assigned: mei, Mentored)

Details

(Keywords: good-first-bug, Whiteboard: [lang=js])

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:131.0) Gecko/20100101 Firefox/131.0

Steps to reproduce:

  1. Open Developer Tools
  2. Go to the Fonts tab
  3. Try to change unit to pt

Actual results:

pt is not in the dropdown

Expected results:

pt should be in the dropdown. In fact, any unit that’s appeared in any CSS actually used by the page (e.g., mm, if mm appears in any loaded CSS file) should be in the dropdown.

I do print-based layouts and I use only pt (px is meaningless for print). The current output for the Fonts tab is not useful for people who try to work on / debug layouts that target print.

The Bugbug bot thinks this bug should belong to the 'DevTools::General' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → General
Product: Firefox → DevTools

the list of units is defined in https://searchfox.org/mozilla-release/rev/d8f30fc43d8a411937b53bb95eb9555356e9bcb8/devtools/client/inspector/fonts/components/FontSize.js#81

unitOptions: ["em", "rem", "%", "px", "vh", "vw"],

It shouldn't be too hard to add a pt item there.

Status: UNCONFIRMED → NEW
Component: General → Inspector
Ever confirmed: true
Keywords: good-first-bug
Mentor: nchevobbe
Type: defect → enhancement
Priority: -- → P3
Whiteboard: [lang=js]

Hi all, I would like to work on this bug

Helo Meike, the bug is now yours :)
If you didn't already, going over https://firefox-source-docs.mozilla.org/devtools/index.html might help you to write a patch and submit it for review.
Let us know if you have any question on this!

Assignee: nobody → meike.pollakowski
Status: NEW → ASSIGNED
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/864970c4b199 Add pt to size unit options in FontSize component. r=nchevobbe,devtools-reviewers
Status: ASSIGNED → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → 136 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: