Custom CSS Persistance Problem

Greetings all! I am new to Squiffy and programming in general, and I am attempting to create my first Squiffy story using the command line on my Mac. I am using the Atom editor and have a small directory containing my index.html, story.js, style.css, jquery.min.js, and main squiffy text file.

My issue is this -- every time I restart my server to update the changes I have made to my main squiffy text file, my CSS file reverts back to its default state. I would like to integrate some styling to my game, including new background colors, different text fonts, etc.., but it has become cumbersome to update my style.css file constantly.

How do I persist my changes to the main style.css file so I can continue to edit and update my main squiffy text file without losing my style changes?

Much appreciated!

~TJ


There may be a "proper" way to do this and if so, hopefully someone will chime in, but what I've been doing to save time is this:

  1. Rename the style.css file (for instance, change it to customstyle.css).
  2. Open the index.html file in a text editor, search for style.css and replace it with customstyle.css (or whatever name you've used for the css file).
  3. Rename index.html to something else (for instance, newindex.html).

Now when you release a new version of your Squiffy story, new default style.css and index.html files will appear in your folder, but customstyle.css and newindex.html should remain untouched. You can just ignore style.css and index.html and use your custom files instead while you are working on the game.

When you're finished your game, you can--if you want--delete the default style.css and index.html files, and then change the names of your custom files back to the original names.


i think you need to create copy of index.html and styles.css and rename it into index.template.html and styles.template.css keep it in the game folder , so every time you build it will create the css file from the template files, you only need to edit the styles.template.css and all the changes you made there will be made into the styles.css when you build automatically.


Thank you both for your input! I will experiment with both methods :-)

Edit: For others wondering the same thing, it appears that both methods work. I have duplicated my style.cssin the same directory and renamed the copy style.template.css, and it now seems that any changes I make to the CSS (for example I have included a neat background gradient and a new font) are persisted while I make changes to my master squiffy file using the app itself.


This topic is now closed. Topics are closed after 180 days of inactivity.

Support

Forums