Skip to content

Instantly share code, notes, and snippets.

@phenix-factory
Created July 22, 2015 14:17
Show Gist options
  • Save phenix-factory/0030a9f4d73fde214b10 to your computer and use it in GitHub Desktop.
Save phenix-factory/0030a9f4d73fde214b10 to your computer and use it in GitHub Desktop.
Modifier proportionellement les font-size du css
<?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