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 |
| em, rem, % | cm, mm, in, pt, pc | ch, ex | px, vw, vh, vmin, vmax |
| annotation ParserAttr | |
| end | |
| annotation TopSymbolAttr | |
| end | |
| annotation SymbolAttr | |
| end | |
| annotation Rule |
| #!/bin/sh | |
| changed_cr_files=$(git diff --cached --name-only --diff-filter=ACM | grep '\.cr$') | |
| [ -z "$changed_cr_files" ] && exit 0 | |
| crystal tool format $changed_cr_files | |
| shards check || exit 1 | |
| bin/ameba -f flycheck $changed_cr_files || exit 1 |
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 |
| em, rem, % | cm, mm, in, pt, pc | ch, ex | px, vw, vh, vmin, vmax |