mirror of https://github.com/zulip/zulip.git
tools: Convert fix-unused-css to look at zulip.scss.
This tool is hackish and incomplete, but it's still worth looking at if somebody wants to hunt down obsolete CSS. There are probably better ways to tackle this problem, so we should eventually just remove this tool, but it's pretty low maintenance. Current output looks like this: $ ./tools/find-unused-css actions_hovered actions_link bookend_tr btn-skip company-name flatpickr-months label_for_text loading_more_messages_indicator_box loading_more_messages_indicator_box_container logoimage messages-collapse messages-expand numInputWrapper page_loading_indicator_box page_loading_indicator_box_container skinny-user-gravatar sp-input summary_colorblock summary_row summary_row_private_message tutorial-done-button
This commit is contained in:
parent
62c0ab3f9d
commit
2488438d90
|
@ -1,8 +1,8 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# Hackish tool for attempting to find unused IDs / classes in our CSS
|
# Hackish tool for attempting to find unused IDs / classes in our CSS
|
||||||
|
|
||||||
for n in $(perl -lne 'print $1 while /[#.]([a-zA-Z0-9_-]+)/g' static/styles/zulip.css | sort -u); do
|
for n in $(perl -lne 'print $1 while /[#.]([a-zA-Z0-9_-]+)/g' static/styles/zulip.scss | sort -u); do
|
||||||
if [ "$(git grep "$n" | grep -cv '^static/styles/zulip.css')" -eq 0 ]; then
|
if [ "$(git grep "$n" | grep -cv '^static/styles/zulip.scss')" -eq 0 ]; then
|
||||||
echo "$n"
|
echo "$n"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in New Issue