You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Switch for line-height to values calculated in relative magnitude, instead of pixels, as the variable itself is set. It is necessary because the line-height must be in a dimensionless value, since this is a font parameter and should depend on the font size. This is an inherited value, so it affects not only the element to which it is assigned, but also any nested ones, which gives an incorrect result when using a dimensional value, even if it is not pixels but a different dimension. In addition, this is an accessibility error, since the font will not necessarily be the size that the site author sets.
Switch for line-height to values calculated in relative magnitude, instead of pixels, as the variable itself is set. It is necessary because the line-height must be in a dimensionless value, since this is a font parameter and should depend on the font size. This is an inherited value, so it affects not only the element to which it is assigned, but also any nested ones, which gives an incorrect result when using a dimensional value, even if it is not pixels but a different dimension. In addition, this is an accessibility error, since the font will not necessarily be the size that the site author sets.
This is briefly discussed on the MDN page for line-height (accessibility is also mentioned above on the page):
https://developer.mozilla.org/en-US/docs/Web/CSS/line-height#prefer_unitless_numbers_for_line-height_values
Example:
The text was updated successfully, but these errors were encountered: