Last active
January 26, 2018 11:04
-
-
Save iksi/d18006c776f954ff75bb6283df49d256 to your computer and use it in GitHub Desktop.
negate possible problematic locale decimal_point for inline styles
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// negate possible problematic locale decimal_point for inline styles | |
$paddingTop = (float) number_format(4 / 3 * 100, 2, '.', ''); | |
echo "padding-top:{$paddingTop}%;"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment