Skip to content

Commit

Permalink
Added note about php version
Browse files Browse the repository at this point in the history
  • Loading branch information
ramonjd authored Jan 25, 2024
1 parent 55ee98c commit 7057ef4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/compat/wordpress-6.5/formatting.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@

/**
* Given a numeric value, returns a rounded a valid CSS <number> as a string.
* Negative zero values, e.g., `-0.0`, will return "0".
* See https://developer.mozilla.org/en-US/docs/Web/CSS/number
* Normalizes LM_NUMERIC locales with non-dot decimal point, e.g., "1,234.56" to "1234.56".
* Negative zero values, e.g., `-0.0`, will return "0"
* The above is relevant to PHP < 8, whose float to string casting is locale-dependent.
* See https://php.watch/versions/8.0/float-to-string-locale-independent
*
* Usage:
* Call just before constructing the final output of your CSS rules, and after any number-based calculation.
Expand Down

0 comments on commit 7057ef4

Please sign in to comment.