Created
July 22, 2015 14:17
-
-
Save phenix-factory/0030a9f4d73fde214b10 to your computer and use it in GitHub Desktop.
Modifier proportionellement les font-size du css
This file contains 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 | |
// Modifier proportionellement les font-size du css | |
$filename = "path/to/style.css"; | |
$css = file_get_contents($filename); | |
$css = preg_replace('/font-size\s*\:\s*([0-9]+)\s*px/ie', '"font-size: " . round($1+($1*0.20)) . "px"', $css); // +20% | |
file_put_contents($filename, $css); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment