A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/w3c/csswg-drafts/issues/6298 below:

[css-values] Specify how to handle negative percentage basis in mathematical expressions · Issue #6298 · w3c/csswg-drafts · GitHub

Some properties like object-position can have a negative percentage basis.

This causes an issue where some browsers calculates/simplifies clamp(100%, 50%, 0%) to 100% ignoring the negative percentage basis, but solves clamp(100%, 50% + 0px, 0%) to 50%. With a percentage basis of -100px the original equation is equal to clamp(-100px, -50px, 0px) which would solve to -50px. Solving the equation without accounting for the negative basis creates unexpected behaviour.

(See https://bugzilla.mozilla.org/show_bug.cgi?id=1709018).

It would be helpful if the spec specified how to handle negative percentage basis in mathematical expressions https://drafts.csswg.org/css-values-4/#calc-func


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.3