It looks like you're new here. If you want to get involved, click one of these buttons!
:: Imported Fonts [stylesheet]
@import url(https://fonts.googleapis.com/css?family=Arvo:400,700);
@import url(https://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700);
:: Basic CSS [stylesheet]
/* Main display and drawers setup */
html, body {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
overflow:hidden;
}
body {
color: #000;
font-family: 'Open Sans',serif;
/* Disable webkit tap-highlighting on non-links */
-webkit-tap-highlight-color: rgba(0,0,0,0);
tap-highlight-color: rgba(0,0,0,0);
}
With SugarCube 1.0.4 installed, the imported fonts simply don't load. The font rules are not being overridden by any SugarCube styles, but e.g. the rule in font-family: 'Open Sans',serif; results in display of the default serif font.
Comments
<style id="style-story">
you will probably find that your@import
rules are not at the top.I could address that in the next release (partially restoring the pre-1.x behavior), however, I'm not certain I should. Currently, there is no way to specify the ordering of multiple
stylesheet
passages, which is problematic since styles cascade (this has been an issue in all story formats since day one). For that reason, I do not recommend using more than onestylesheet
passage. And, if you're not using more than onestylesheet
passage, the new behavior won't affect your@import
rules.My suggestion would be to consolidate your various
stylesheet
passages, putting the @import rules at the very top (they must precede most other rules).Additionally, I'd suggest getting the habit of quoting the contents of
url()
notation, since non-US-ASCII characters are not allowed in unquoted versions. You don't have that problem here, but getting into the habit ensures that you never run afoul of that particular gotcha.TL;DR: Using multiple
stylesheet
passages is, and always has been, broken. Don't do that, since, even with the old behavior, you never know when it's going to bite you in the arse. Use onestylesheet
passage per story/game.Thanks for the tip, greyelf. I don't have much interest in Twine 2, honestly, at least not until it's a downloadable app, supports external files (I hate the graphical Twine interface for anything but occasional visualization), and either has all of the great features of SugarCube or there is a SugarCube 2 to go along with it!
No story format makes guarantees about the order of the tiddlers within the passage store (that's a compiler issue), nor does any story format, currently (AFAIK), make guarantees about preserving the ordering existent within the passage store when decoding it into the passage cache (and the cache is what is processed during
script
andstylesheet
setup).Some compilers (TweeGo and Twee 1.4+) are setup to maintain the same ordering existent in the source files when compiling the passage store, however, that only addresses the first issue (and only if the author knows about it and ensures the proper order in their source files). Twine 1 is trickier because, well, story map.
Frankly, user styles and scripts should have been handled via singular special passages (e.g.
StoryStyles
&StoryScripts
or something like those), rather than via tags, in Twee/Twine 1 and their story formats.Do both (sort of)? That should not be taken as the start of a Twee tiddler, while still allowing you to search for `
:: blah
`.[IMG width=500]http://i.imgur.com/2gSC7Tw.png[/img]
Chrome for OSX, Firefox, and other browsers don't seem to have this issue. I can't see anything in the CSS that would cause it. Is anyone else seeing this?
Let me see what I can find out.
Okay, that didn't take too long. After some poking in Chrome for Windows, it appears that the problem is the element's height. If it exceeds
27px
or so, it goes wonky and starts displaying the rendering error past the left side, making it look off-center. It looks like I can stop its histrionics simply by setting its height to something less than the failure point.Could you please try this style out and confirm that it patches the issue? If it does, then I'll add it to SugarCube's core CSS.
<style id="style-init-screen">
would be the logical place). The loading screen must be available before the document is ready, which means before the format's entry function is called, thus before any passages are processed (incl.stylesheet
passages).What's interesting is that there was no FUOC when all I was doing was limiting the height to 20px, but I suppose that my new CSS is a lot more complicated and just takes more time to render.
http://jsfiddle.net/u6td8swk/4/
It's a simple but fairly modern-looking indeterminate progress bar based on the one in this tutorial.