Possible improvement to Inform7 Parchment "style.css"

For my Adventure stuff, I’ve made a little modification to the conditions under which “style.css” will switch to a single-column “mobile” view.

github.com/Quuxplusone/Advent/commit/999c7ea5

I’ve been given to understand that the Parchment .js/.css stuff currently distributed with Inform7 is woefully out of date, but at the same time I don’t see any hits on the Inform7 bug tracker for “parchment” or “css”. This “style.css” isn’t part of curiousdannii’s Parchment distribution (curiousdannii/parchment) and I can’t find it in ptomato/gnome-inform7 either. But I feel like someone out there might be interested in this patch, or even be able to suggest improvements, so I’m posting the link here.

The proper place for this would be the parchment bug tracker.

Does using ch’s instead of em’s work?

Nope, according to w3schools.com/cssref/css_units.asp , which lists “em” but not “ch” as a valid unit of measurement in CSS. Apparently “em” in CSS isn’t defined as the width of an m anyway; it’s defined as the point size of the current font, regardless of how wide or narrow the font is. Which is a decent enough proxy for whatever it is we’re actually trying to measure.

I couldn’t find a .css file in your Github repo that looked at all similar to this one, so I figured it wasn’t proper to file an issue about it on Github… besides which I don’t see an “issues” page there, so I’m actually not sure where the Parchment bug tracker lives.

Not just in CSS; this is what “em” has always meant. (Specifically, in lead type it’s a square – the same distance across as the distance from baseline to baseline, without extra leading between the lines of text.)

checks Wikipedia Hm. I stand corrected.

Thanks. :slight_smile:

w3schools is horribly outdated.

code.google.com/p/parchment/issues/list

Adding to what Dannii said: http://w3fools.com/
Plus some other people’s opinions on W3Schools: http://www.hnsearch.com/search#request/all&q=w3schools

@dannii @iszek: FWIW, w3schools was right in this case. “ch” isn’t a thing. reference.sitepoint.com/css/lengthunits

If you want to know something go to the spec: w3.org/TR/css3-values/#relative-lengths

And if you want to know something else, go to another spec: w3.org/TR/2011/REC-CSS2-2011 … ngth-units :wink:

Looks like “ch” is (or rather, will be; what you linked is a non-normative draft) new in CSS3. It’s equal to the width of the “0” glyph in the current font, which doesn’t really seem any closer to what we care about for displaying interactive fiction. I’d stick with “em”: it’s current, it’s supported, everyone (even W3Schools :wink:) knows about it.

This guy says 25 to 33em. maxdesign.com.au/articles/em/ I say 35 to 40.

If ch was more widely supported it would be a reasonable measure of the average width of a character in a non-monospaced font. As it is now, Parchment does all measuring with the monospaced status line font.