Skip to content

Instantly share code, notes, and snippets.

@kdisneur
Last active October 12, 2015 15:08
Show Gist options
  • Save kdisneur/4045596 to your computer and use it in GitHub Desktop.
Save kdisneur/4045596 to your computer and use it in GitHub Desktop.
trouve toutes les couleurs définies dans le css
color_pattern='#[a-fA-F0-9]{3,6}';
for color in $(find app/assets/stylesheets -iname '*.scss*' -exec grep -oE "${color_pattern}([^_-]|$)" {} \; | grep -oE $color_pattern | sort | uniq); do
if [ $color != ':' ]; then
echo "couleur: $color, occurences: $(grep -R $color app/assets/stylesheets | wc -l)"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment