@mixin text-crop($line-height: 1.3, $top-adjustment: 0px, $bottom-adjustment: 0px) { // Configured in Step 1 $top-crop: 9; $bottom-crop: 8; $crop-font-size: 36; $crop-line-height: 1.2; // Apply values to calculate em-based margins that work with any font size $dynamic-top-crop: max(($top-crop + ($line-height - $crop-line-height) * ($crop-font-size / 2)), 0) / $crop-font-size; $dynamic-bottom-crop:
![[CSS]文字に含まれる上下の余白を取り除いて、アイコンや画像とぴったり同じ高さにするスタイルシート](https://cdn-ak-scissors.b.st-hatena.com/image/square/68bca0fb8072db54e7ab59b2b8b09d0ef4cc9644/height=288;version=1;width=512/https%3A%2F%2Fcoliss.com%2Fwp-content%2Fuploads-201802%2F2018040301.png)