mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-01 03:57:15 +02:00
LibWeb: Don't resolve calc'd opacity percentages at parse time
This behaviour should only apply to literal percentages as clarified here: https://github.com/w3c/csswg-drafts/commit/4ee8429 We were also doing this wrong by converting the numeric type of the calc to Length which was causing values to be defaulted to 1 instead (hence the new passing tests for computed values as well)
This commit is contained in:
committed by
Tim Ledbetter
parent
d53668b376
commit
246a1c41ff
Notes:
github-actions[bot]
2025-09-08 10:07:16 +00:00
Author: https://github.com/Calme1709 Commit: https://github.com/LadybirdBrowser/ladybird/commit/246a1c41ff9 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6112 Reviewed-by: https://github.com/AtkinsSJ Reviewed-by: https://github.com/tcl3 ✅
@@ -2,14 +2,13 @@ Harness status: OK
|
||||
|
||||
Found 12 tests
|
||||
|
||||
11 Pass
|
||||
1 Fail
|
||||
12 Pass
|
||||
Pass testing tab-size: calc(2 * 3)
|
||||
Pass testing tab-size: calc(2 * -4)
|
||||
Pass testing opacity: calc(2 / 4)
|
||||
Pass testing tab-size: calc(2 / 4)
|
||||
Pass testing opacity: calc(2 / 4) * 1px
|
||||
Fail testing opacity: calc(90%)
|
||||
Pass testing opacity: calc(90%)
|
||||
Pass testing tab-size: calc(1 + 1px)
|
||||
Pass testing tab-size: calc(1 + 100%)
|
||||
Pass testing tab-size: calc(100%)
|
||||
|
||||
Reference in New Issue
Block a user