[Web] Refactor magic values for key width, padding and margin into constants, and reduce over-enthusiastic rounding efforts