Last active
August 29, 2015 14:03
-
-
Save alerque/74d6cfc91bfd67a59485 to your computer and use it in GitHub Desktop.
Simple template for CSS tidy that indents with two spaces
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
find ./ -iname '*.css' -not -iname '*.min.css' \ | |
-execdir csstidy {} --silent=true --template=~/scratch/csstidy.tpl --compress_colors=true --compress_font-weight=false --discard_invalid_properties=false --preserve_css=true --remove_bslash=true --sort_properties=true --sort_selectors=true --timestamp=false --merge_selectors=0 --case_properties=1 --optimise_shorthands=0 {} \; \ | |
-execdir sed '/{$/s/\(\s*\)\([^,]\+\),/\1\2,\n\1/g' -i {} \; \ | |
-execdir sed '/^@media/s/\(min\|max\)-width\s*\([^ ]\+\)/(\1-width:\2)/' -i {} \; \ | |
-execdir sed "/src:/s/format(\([^')]\+\))/format(\'\1\')/g" -i {} \; \ | |
-execdir sed 's/-\(webkit\|moz\|ms\)-\(transition\): 0 / -\1-\2: -\1-transform /g' -i {} \; \ | |
-execdir vim +StripWhitespace +x {} \; |
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
| { | |
|| { | |
| | |; | |
|}| | |
| | |
} | |
| || | |
| | |
| |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment