I can't get stylesheets to work in Harlowe 1.0.1 in Twine 2.0.2. I input the following into the stylesheet:
body {
background-color: "black";
color: "white";
font-family: "courier"
}
but nothing changes in my story. Am I using incorrect syntax? Does Harlowe support stylesheets?
Comments
1. You don't wrap CSS color keywords like black and white in double quotes.
2. The foreground color and font family should be on the tw-story element.
Try the following: (note: I assumed you wanted the background colour to cover the whole page and not just the area where the passage text is displayed. If you only want the area where the passage text is to be black then move the background-color: black; from the body to the tw-story selector.)
What witchcraft is this?! Everything is supposed to inherit from <body>.
(I tested using Firefox and Chrome) The tw-story and tw-passage elements are not children of the body tag, which is one reason why CSS associated with the body does not always flow down to the tw-story and tw-passage elements.
<tw-story>
) and story stylesheet (<style data-title="Story stylesheet ">
) elements are being created outside of what should be their respective parents (<body>
and<head>
).The latter seems like it's a simple error, using
$(document.head).<u>after</u>()
instead of$(document.head).<u>append</u>()
.The former seems to be appending
<tw-story>
to<html>
intentionally, depending on the browser to attach it to<body>
instead, which isn't defined behavior at all. No modern browser that I know of will do that.[quote]Although the <tw-story> is being reattached to <html>, the browser will transport it to the <body> anyway.