Something went wrong. Try again.
uncomplicated css defaults
Something went wrong. Try again.
Files
- CSS 96%
- Shell 4%
readme.md
css
/*
sensible css defaults
see:
- main.css (full setup w layers)
- min.css (don't overthink)
also:
- style/base/reset.css
and:
- style/base/apple-system-colors.css (for apple system colors using :root)
*/
usage #
min.css #
# copy min.css to clipboard and paste into <style>
curl -s https://tangled.org/mackenzie.blue/css/raw/main/min.css | pbcopy
main.css #
# clone `main.css` along with `style/` into current directory
git clone --depth=1 --no-checkout https://tangled.org/mackenzie.blue/css.git _tmp_css && \
mv _tmp_css/* . 2>/dev/null || true && \
trash _tmp_css && \
trash min.css
dev #
git pre-commit hook
#!/usr/bin/env bash
set -e
set -u
set -o pipefail
# check if reset.css is staged
if ! git diff --quiet --cached style/base/reset.css; then
# if reset.css is staged, check that min.css is staged too
if git diff --quiet --cached min.css; then
echo "
it looks like you edited styles/base/reset.css
but didn't update min.css with your changes
to rebuild min.css with your changes, you can run:
$ ./build-min
and then add and commit your changes
(to bypass this check, run git commit again with --no-verify)"
# exit with error
exit 1
fi
fi