Created
October 5, 2012 18:20
-
-
Save hekt/3841489 to your computer and use it in GitHub Desktop.
add vendor prefixes
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
;; add css vendor prefixes | |
(defun add-css-vendor-prefixes (start end) | |
(interactive "r") | |
(replace-regexp | |
"\\([\s\t]*\\)\\(\\(?:.\\|\n\\)+;\\)" | |
"\\1-webkit-\\2\n\\1-moz-\\2\n\\1-ms-\\2\n\\1-o-\\2\n\\&" | |
nil start end)) | |
(defun add-css-vendor-prefixes-to-value (start end) | |
(interactive "r") | |
(replace-regexp | |
"\\([\s\t]*[a-zA-Z-]+[\s\t]*:[\s\t]*\\)\\(\\(?:.\\|\n\\)+;\\)" | |
"\\1-webkit-\\2\n\\1-moz-\\2\n\\1-ms-\\2\n\\1-o-\\2\n\\&" | |
nil start end)) | |
(defun add-css-vendor-prefixes-to-both (start end) | |
(interactive "r") | |
(replace-regexp | |
"\\([\s\t]*\\)\\([a-zA-Z-]+[s\t]*:[\s\t]*\\)\\(\\(?:.\\|\n\\)+;\\)" | |
"\\1-webkit-\\2-webkit-\\3\n\\1-moz-\\2-moz-\\3\n\\1-ms-\\2-ms-\\3\n\\1-o-\\2-o-\\3\n\\&" | |
nil start end)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment