Created
January 26, 2014 20:41
-
-
Save ryelle/8639210 to your computer and use it in GitHub Desktop.
Regex for finding margins & padding in CSS. Ended up not terribly useful, but interesting?
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
| (padding|margin)(-top|-left|-right|-bottom)?:(\s*(\d*(.\d*)?(em|rem|px|)|auto)){1,4}\s*(!important)?; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for this, but it could be updated to match negative values like:
margin: -9px;