Bug 218299

Summary: Incorrect calc percent values in SVG
Product: WebKit Reporter: Zach Bjornson <zbbjornson>
Component: SVGAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: ahmad.saleem792, ap, bfulgham, koivisto, maggotfish, simon.fraser, webkit-bug-importer, zalan, zimmermann
Priority: P2 Keywords: BrowserCompat, InRadar, LayerBasedSVGEngine
Version: Safari 13   
Hardware: Unspecified   
OS: Unspecified   

Zach Bjornson
Reported 2020-10-28 11:31:39 PDT
https://jsfiddle.net/u4kp7jLx/2/ In this example, the two circles differ only in the value of --t1: --t1: calc(100% - 4px); /* bug */ --t1: calc(100px - 4px); /* okay */ That's applied to an SVG element with width=100 height=100, so 100% == 100px. This works correctly in Firefox and Chrome. (Safari 13.1.2)
Attachments
Radar WebKit Bug Importer
Comment 1 2020-10-28 19:23:22 PDT
Ahmad Saleem
Comment 2 2022-08-29 04:19:02 PDT
I am able to reproduce this bug in Safari Technology Preview 152 on macOS 12.5.1 using test case from Comment 0. *** Safari Technology Preview 151 *** First box - Full Blue Circle inside <<<---------- BUG Second box - Semi blue circle *** Firefox Nightly 106 & Chrome Canary 107 *** Both boxes - Semi blue circle _____________ Just wanted to share updated testing results. Thanks!
Note You need to log in before you can comment on or make changes to this bug.