Skip to content

Instantly share code, notes, and snippets.

View DrMaxNix's full-sized avatar

DrMaxNix DrMaxNix

View GitHub Profile
@mjj2000
mjj2000 / get-current-git-tag.sh
Last active August 26, 2024 22:49
[GIT] Get tag of current branch(that is HEAD) or fallback to short commit hash(7 digits) by single shell command
git describe --exact-match --tags 2> /dev/null || git rev-parse --short HEAD
@basham
basham / css-units-best-practices.md
Last active September 4, 2024 01:00
CSS Units Best Practices

CSS units

Recommendations of unit types per media type:

Media Recommended Occasional use Infrequent use Not recommended
Screen em, rem, % px ch, ex, vw, vh, vmin, vmax cm, mm, in, pt, pc
Print em, rem, % cm, mm, in, pt, pc ch, ex px, vw, vh, vmin, vmax

Relative units

Relative units