15419 shaares
69 liens privés
69 liens privés
With a unitless line-height, the value of the line-height is reevaluated for every single children based on said children’s font-size. Here the container is set to font-size:1rem; line-height:1.25. The <h1> gets a line height of 40px. The <p> gets a line height of 20px.
With a percentage line-height, the value of the line-height is evaluated once on the parent, and then applied at that exact same value for every children. Here the container is set to font-size:1rem; line-height:125%. The <h1> gets a line height of 20px. The <p> gets a line height of 20px.