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
Even when using web fonts, font metrics vary across browsers. We need the ability to easily do relative comparisons to the current browser's font metrics.
For example, if we want to test that buttons have 10px of padding, this doesn't work cross browser:
button.assert({height: 38});
Instead, we need to do this:
button.assert({height: font.height.plus(10)});
It's possible to emulate this now by creating an element with the font in it, but I would like this to be foolproof and easy. A dedicated 'font' descriptor would also open up opportunities for useful comparisons such as x-height, m-width, and so forth.
The text was updated successfully, but these errors were encountered:
Even when using web fonts, font metrics vary across browsers. We need the ability to easily do relative comparisons to the current browser's font metrics.
For example, if we want to test that buttons have 10px of padding, this doesn't work cross browser:
Instead, we need to do this:
It's possible to emulate this now by creating an element with the font in it, but I would like this to be foolproof and easy. A dedicated 'font' descriptor would also open up opportunities for useful comparisons such as x-height, m-width, and so forth.
The text was updated successfully, but these errors were encountered: