- From: CSS Meeting Bot via GitHub <sysbot+gh@w3.org>
- Date: Wed, 22 Jan 2020 10:06:42 +0000
- To: public-css-archive@w3.org
The CSS Working Group just discussed `sign()`, and agreed to the following: * `RESOLVED: add the sign() function as described in the issue, restricted to numbers only` <details><summary>The full IRC log of that discussion</summary> <bkardell_> topic: sign()<br> <bkardell_> TabAtkins: this one was opened by oriol, asking for Math.sign equivalent, the usecase presented is hacky, but sure, why not - it seems unobjectionable - I'm happy to add it... he notes you can actualy implement it yourself, it is even worse<br> <astearns> github: https://github.com/w3c/csswg-drafts/issues/4673<br> <bkardell_> myles_: should the sign of 1px be....<br> <bkardell_> heycam: it should return a number if we allow lengths<br> <bkardell_> emilio: what about percentages?<br> <bkardell_> TabAtkins: 50% should resolve to whatever that resolves to<br> <bkardell_> bkardell_: in ..pixels<br> <bkardell_> TabAtkins: in many cases, pixels, but whatever that resolves against<br> <heycam> make calc(sign(1px)) == 1, because you usually use the result of sign() to multiply against other things<br> <bkardell_> myles: you could always add non-numbers later<br> <bkardell_> heycam: does css really support positive and negative values?<br> <dbaron> s/values/zeroes/<br> <Rossen___> q?<br> <bkardell_> TabAtkins: in calc, yes - we use the js semantics -- once you exit the calc no... it can affect the infinity<br> <dbaron> TabAtkins: yes, but only inside of calc()<br> <bkardell_> fantasai: I dont think you can parse one in?<br> <bkardell_> dbaron: you can write an negative 0, but it is just 0<br> <bkardell_> TabAtkins: if you produce a negative 0 as a result of the calc, you can have a negative 0<br> <bkardell_> Rossen___: is there a use case for that?<br> <bkardell_> TabAtkins: consistency with JavaScript?<br> <bkardell_> Rossen___: so we _want_ that in this case? :)<br> <bkardell_> TabAtkins: you can insert directly via typed om, actually<br> <bkardell_> TabAtkins: anyone have an objection to sign() restricted to numbers only?<br> <bkardell_> Rossen___: any objections?<br> <astearns> cbiesinger: Tab explained you get negative zero by dividing by negative infinity, which you get by -1/0<br> <bkardell_> RESOLVED: add the sign() function as described in the issue, restricted to numbers only<br> </details> -- GitHub Notification of comment by css-meeting-bot Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4673#issuecomment-577106606 using your GitHub account
Received on Wednesday, 22 January 2020 10:06:47 UTC