This is a bit of a crafty/artsy topic. We’ve been moving more towards web enabled content in the IF world for a number of years now. There a re number of web-enabled things you can do with Inform 7 and Quixe.
I’m wondering what the author’s perspective is on style. In my mind, there are two basic approaches, similar to web development. There are inline styles, often considered taboo, and CSS based styles, considered a standard. There are even standards for generated CSS from things like SASS and LESS. There may be an author or two that is fluent in web design, but I think most authors are just throwing paint at a wall and hoping for the best. In the latter case, we may decide to procure the assistance of someone outside the IF world to help with design.
Given the idea that we may design our stories, I’d like to develop something that would provide the average author with baseline techniques, but also enable a professionally designed approach.
Some of the basic inline type things that could be done include:
- Font-Weight: We might want the ability to weight our text (bold/normal or one of the standard numerical weights).
- Font-Family: We might want to implement our own flavor of fonts for various reasons.
- Background-Color and Color: We might want to display text in any color and have the background-color be set as well.
Some CSS type things we could do are relatively simple. As long as text is wrapped in tags, the result can be manipulated in CSS on the web side.
But it may be all of this is more than what is necessary. If a section of text will always be Arial, 12pt, Normal, then we really don’t need to relay any information to the browser. That would be handled by our target template. On the other hand, we may want to identify portions of text with markup such as weight and color and text-decoration. We may want some portions of text to be a hyperlink. We may want to inject images, videos, or other components with a portion of text.
I don’t expect a lot of comment on this subject, but I wanted to get your thoughts. Obviously my work is in reference to FyreVM-Web, which would allow a savvy author to do “anything”. But I’d like to create one or more style-based extensions that provide some baseline styling capabilities.
I have on extension that I wrote at least a year ago that provides in-text Font manipulation and CSS styles. Adding Hyperlinks would be trivial and it would all look like this:
To style the thingamabob:
say "[arial-normal]The [bold]thingamabob[/bold] is a [underline]brightly[/underline] lit construct made of [link command="examine steel plating"]steel plating[/link][/arial-normal].";
or just emit HTML…(though links would still need processing, since we’re executing commands, and I wouldn’t expect an author to write that code in I7).
To style the thingamabob:
say "The <b>thingamabob</b> is a <u>brightly</u> lit construct made of [link command="examine steel plating"]steel plating[/link].";