html に font-size: 62.5%; を指定するのはやめよう | Cherry Pie Web
https://www.cherrypieweb.com/4353 より
フォントサイズにremを使用する際にいちいち計算をする必要はない。
:root { --root-font-size: 16; } p { font-size: calc( 13 / var(--root-font-size) * 1rem ); }
CSSファイルにダミーのクラスでコピペ用のコードを書いておく
/* コピペ用コード */ .font-size-dummy { font-size: .75rem; /* 12px */ font-size: .8125rem; /* 13px */ font-size: .875rem; /* 14px */ font-size: 1rem; /* 16px */ font-size: 1.25rem; /* 20px */ font-size: 1.75rem; /* 28px */ }