All right, we just went thru the JS Math object and reviewed every single function for inclusion into CSS. Results:
-
-
Do I understand it correct that the first option tries to account for both cases when the remainder is 1 or -1, if the answer for the 1st poll is "-3px"?
-
Yes, both A answers assume the same behavior, and both B answers.
- Još 3 druga odgovora
Novi razgovor -
-
-
A proper conditional instead. x + (mod(y, 2) !== 0 ? 1 : 0). This is a serious answer: in most cases I would probably want something other than 1 or 0, and doing calculations there instead of a proper conditions is just bad.
-
The "!= 0" solution only works for even/odd. If you want to care about, say, the value mod 3, you do have to explicitly care about, say, 1 and -2.
- Još 4 druga odgovora
Novi razgovor -
-
-
no abs()?
-
Whoops, I missed it! Yes, we're adding abs(). (You can already spell that hypot(X) in the current spec, but that's not obvious.)
- Još 5 drugih odgovora
Novi razgovor -
-
-
I'd prefer to be able to do either when desired. Another parameter or another function would be useful.
-
You can always do the other with a bit of manipulation right now. If you have a reasonable use-case for the JS behavior I'd love to see it.
Kraj razgovora
Novi razgovor -
-
-
x + odd(y)
Hvala. Twitter će to iskoristiti za poboljšanje vaše vremenske crte. PoništiPoništi
-
Čini se da učitavanje traje već neko vrijeme.
Twitter je možda preopterećen ili ima kratkotrajnih poteškoća u radu. Pokušajte ponovno ili potražite dodatne informacije u odjeljku Status Twittera.
Gendermeh, “they” plz.