#!/bin/bash
cd "$1"
for f in dist/assets/*.css; do echo "== $f $(wc -c <$f)"; for feat in 'light-dark(' '@starting-style' 'text-wrap' 'field-sizing' '@property' 'content-visibility' 'anchor-name' 'position-anchor' 'interpolate-size' '@scope' 'view-transition' 'animation-timeline' 'scrollbar-width' 'scrollbar-color' 'scrollbar-gutter' 'text-box' 'color-mix(' 'oklch(' 'oklab(' '@container' 'backdrop-filter' '-webkit-backdrop-filter' 'overflow:clip' 'position-area' 'transition-behavior' 'contain-intrinsic' 'inert' ':popover-open' ':has(' '::backdrop' 'dvh' 'svh' 'env(safe-area' 'white-space-collapse' 'container-type' 'display:contents' 'accent-color' 'color-scheme' '-webkit-line-clamp' 'calc-size' 'if(' 'sibling-index' 'corner-shape' 'appearance:base' '&' '@layer' 'inset-inline' 'translate:' 'rotate:' 'scale:' 'text-decoration-thickness' 'overscroll-behavior' 'user-select' '-webkit-user-select' 'mask-' '-webkit-mask' 'font-variation' 'aspect-ratio' 'gap:' 'lh' 'cqw' 'cqi' 'ic' 'rem' 'clamp(' 'min(' 'max(' 'round(' 'sign(' 'abs(' 'mod(' 'rem(' 'pow(' 'hypot(' 'log(' 'exp(' 'sin(' 'cos(' 'tan(' 'atan2(' 'sqrt(' 'text-wrap:balance' 'text-wrap:pretty' 'field-sizing:content' 'x1' 'letter-spacing' 'inset:' 'place-content' 'text-align-last' 'hanging-punctuation' 'hyphens' 'ime-mode' 'zoom:'; do c=$(grep -o -F -- "$feat" "$f" | wc -l); [ "$c" != 0 ] && echo "  $feat: $c"; done; done 2>/dev/null
