intfiction.org

The Interactive Fiction Community Forum
It is currently Sat May 25, 2013 8:03 pm

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 11 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Tue Jul 03, 2012 7:37 pm 
Offline

Joined: Sun Apr 15, 2012 9:48 pm
Posts: 78
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.

https://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.


Top
 Profile Send private message  
 
PostPosted: Sat Jul 07, 2012 8:00 pm 
Offline
User avatar

Joined: Wed Oct 14, 2009 4:02 am
Posts: 963
The proper place for this would be the parchment bug tracker.

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


Top
 Profile Send private message  
 
PostPosted: Sat Jul 07, 2012 10:18 pm 
Offline

Joined: Sun Apr 15, 2012 9:48 pm
Posts: 78
Dannii wrote:
The proper place for this would be the parchment bug tracker.

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

Nope, according to http://www.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.


Top
 Profile Send private message  
 
PostPosted: Sat Jul 07, 2012 10:29 pm 
Offline

Joined: Thu May 20, 2010 9:33 pm
Posts: 479
Quuxplusone wrote:
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.


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.)


Top
 Profile Send private message  
 
PostPosted: Sat Jul 07, 2012 10:41 pm 
Offline

Joined: Sun Apr 15, 2012 9:48 pm
Posts: 78
tove wrote:
Quuxplusone wrote:
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.
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. :)


Top
 Profile Send private message  
 
PostPosted: Sat Jul 07, 2012 10:45 pm 
Offline
User avatar

Joined: Wed Oct 14, 2009 4:02 am
Posts: 963
w3schools is horribly outdated.

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


Top
 Profile Send private message  
 
PostPosted: Sun Jul 08, 2012 5:43 am 
Offline
User avatar

Joined: Sat Dec 22, 2007 9:03 pm
Posts: 175
Dannii wrote:

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


Top
 Profile  
 
PostPosted: Mon Jul 09, 2012 12:41 pm 
Offline

Joined: Sun Apr 15, 2012 9:48 pm
Posts: 78
Quuxplusone wrote:
Dannii wrote:
Does using ch's instead of em's work?
Nope, according to http://www.w3schools.com/cssref/css_units.asp , which lists "em" but not "ch" as a valid unit of measurement in CSS.

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


Top
 Profile Send private message  
 
PostPosted: Mon Jul 09, 2012 6:58 pm 
Offline
User avatar

Joined: Wed Oct 14, 2009 4:02 am
Posts: 963
If you want to know something go to the spec: http://www.w3.org/TR/css3-values/#relative-lengths


Top
 Profile Send private message  
 
PostPosted: Mon Jul 09, 2012 7:26 pm 
Offline

Joined: Sun Apr 15, 2012 9:48 pm
Posts: 78
Dannii wrote:
If you want to know something go to the spec: http://www.w3.org/TR/css3-values/#relative-lengths

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

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 ;)) knows about it.

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


Top
 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ]  Go to page 1, 2  Next

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group