Bug 284955

Summary: piccalil.li: Font size doesn't scale with Command-+ because of use of clamp()
Product: WebKit Reporter: Simon Fraser (smfr) <simon.fraser>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: bfulgham, fantasai.bugs, karlcow, sam, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: BrowserCompat, InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
URL: https://piccalil.li

Simon Fraser (smfr)
Reported 2024-12-19 08:51:45 PST
Load piccalil.li and try to increase or decrease the zoom level with Command-+. The font size doesn't scale. It does in other browsers.
Attachments
Radar WebKit Bug Importer
Comment 1 2024-12-19 08:51:59 PST
Karl Dubost
Comment 2 2024-12-22 21:41:09 PST
``` .card__summary { font-size: var(--card-summary-font-size , var(--text-size-base)); } ``` `font-size: var(--card-summary-font-size , var(--text-size-base));` ➜ `--card-summary-font-size: var(--text-size-base);` ➜ `--text-size-base: var(--size-step-0);` ➜ `--size-step-0: clamp(1.0625rem, 0.9954rem + 0.3356vi, 1.3125rem);` Computed Zoom Level 0 ``` font-size: 18.785711px; var(--card-summary-font-size,var(--text-size-base)) .card__summary var(--text-size-base) body ``` Computed Zoom Level +1 ``` font-size: 16.335402px; var(--card-summary-font-size,var(--text-size-base)).card__summary var(--text-size-base)body ``` Computed Zoom Level +2 (no changes) ``` font-size: 16.335402px; var(--card-summary-font-size,var(--text-size-base)).card__summary var(--text-size-base)body ``` Computed Zoom Level +3 ``` font-size: 12.523808px; var(--card-summary-font-size,var(--text-size-base)).card__summary var(--text-size-base)body ``` With Firefox the computed font-size also reduces, but the visual font size is increasing. At each zoom level the width of the body in both Firefox and Safari is getting smaller. The code is using vi and rem for the font-size https://drafts.csswg.org/css-values/#vi It might be a duplicate of Bug 212522 *** This bug has been marked as a duplicate of bug 212522 ***
Note You need to log in before you can comment on or make changes to this bug.