Editing Story JavaScript and CSS

Twine allows you to add both JavaScript and CSS (short for Cascading Stylesheets) to your stories. This code allows you to customize the behavior and appearance of your story when it's played, but the exact details of how to do this depend on which story format you're using. You should read your story format's documentation for more information on how this works.

JS and CSS are both web standards, and accordingly there are many online resources that can teach you how to use them. The Mozilla Developer Network, for example, has CSS and JS learning areas which contain gentle tutorials on both these technologies.

To edit a story's CSS, choose Stylesheet from the Story top toolbar tab. To edit a story's JavaScript, choose JavaScript from the Story top toolbar tab. Like passage edit dialogs, these dialogs automatically save changes a moment after you stop typing.