Ядро темы
Зависит от однострочности и контейнера.
.pill {
height: 2.5rem;
line-height: 2.5rem;
}
.box {
display: flex;
align-items: center;
justify-content: center;
min-height: 4rem;
}
.box { display: grid; place-items: center; }
Старый трюк с table-cell + vertical-align: middle почти не нужен.
Итог
Для UI по умолчанию Flex/Grid. line-height = height — только для простых однострочных случаев.