Search⌘ K

Form Field Rhythm Enforcer

Explore how to maintain vertical rhythm in form layouts by defining a CSS custom property for spacing. Learn to apply rhythm units consistently to labels and inputs using rem units and CSS variables, ensuring uniform spacing and cleaner design without changing HTML structure.

Problem description

You have a simple form with multiple <label> and <input> pairs. Your task is to define a CSS custom property for a 2rem rhythm unit and apply it to the line-height ...