Comment 1 for bug 1490167

Revision history for this message
Lewis Goddard (lewisgoddard) wrote :

`ch` is the unit for character width, which is taken from "0", and if not available is assumed to be 0.5em

The full set of font-relative lengths are: em, ex, ch, & rem.
You can read more about them here: https://drafts.csswg.org/css-values-3/#font-relative-lengths

Unfortunately, I am not sure of the support Gtk offers for such a simple css method, and it is possible they themselves are using some more complex mathematics to figure out character-based widths. In fact, even Chrome doesn't support it yet. http://www.quirksmode.org/css/units-values/

As a fallback, we could use the default of 0.5em and make an assumption based on that.

```
width: 30em; // Roughly 60 characters.
width: 60ch; // Exactly 60 characters.
```