Closed Bug 1619697 Opened 4 years ago Closed 3 years ago

Twisty icon is too big and doesn't follow font-size scaling

Categories

(Toolkit :: Themes, defect, P3)

defect

Tracking

()

RESOLVED DUPLICATE of bug 1705454
Tracking Status
firefox-esr68 --- unaffected
firefox74 --- unaffected
firefox75 --- fixed
firefox76 --- affected

People

(Reporter: aleca, Unassigned)

References

Details

Attachments

(3 files)

As pointed out in bug 1560540 comment 63, the updated twisty size doesn't really fix the issue and causes the element to look bloated.

The user asked for the twsity to be bigger for accessibility reasons, but the solution of simply increasing the icon size is not correct.
The icons should scale alongside the font size to guarantee the expected level of accessibility without affecting the balance of the UI.

Priority: -- → P3

Regressing change backed out of 75.

Depends on: 1560540
No longer regressed by: 1560540

I'm not sure if this is a silly question, but would that be possible enable SVGs autoscaling?
By its own nature, if we don't specify the width and height attributes and we only use the viewBox attribute, the SVG scales automatically to fill the container, and it keeps its aspect ratio.
I tried to use this method as a test, which it works on a regular HTML file, but it doesn't in TB.

Flags: needinfo?(ntim.bugs)

(In reply to Alessandro Castellani (:aleca) from comment #2)

I'm not sure if this is a silly question, but would that be possible enable SVGs autoscaling?
By its own nature, if we don't specify the width and height attributes and we only use the viewBox attribute, the SVG scales automatically to fill the container, and it keeps its aspect ratio.
I tried to use this method as a test, which it works on a regular HTML file, but it doesn't in TB.

Do you have an HTML example ?

While viewBox may work, it's still constrained by the width set in the CSS: https://searchfox.org/mozilla-central/source/toolkit/themes/shared/tree.inc.css#171

Might be possible to use em units in the CSS, though I'm not sure.

(Also, unassigning myself as I have other priorities atm)

Assignee: ntim.bugs → nobody
Flags: needinfo?(ntim.bugs) → needinfo?(alessandro)
Keywords: regression
Attached image twisty.svg

SVG icon without width and height attributes.

Attached file svg-resize.html

A silly HTML file example where I'm using the SVG for the bullet list and it resizes based on custom CSS attributes or by inheriting the font size of the list.

Flags: needinfo?(alessandro)

Have enough ideas for a workable patch?

Flags: needinfo?(alessandro)

I think there's not an easy CSS fix unless we replace the SVGs with something smaller, but then we end up with the opposite problems were users might find the twisty icons too small and they can't easily scale them up.

I think this is something we have to keep as it is until we find a good replacement for the tree element.

Flags: needinfo?(alessandro)
See Also: → 1446341

This is not an issue anymore as we're overriding these icons with our own variation.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: