A probably obvious question regarding the CSS files accompanying the Parchment interpreter

I hesitated to ask at all, but just in case someone searching also wonders:

I can see that the Parchment interpreter (as in release along with a "Parchment" interpreter) includes 2 CSS files.

  • parchment.css
  • main.css

parchment.css has some familiar elements. I’ve spent some time with the Quixe CSS and recognize some things.

However, I am having a tough time with the format. In my Notepad++ window, the entire CSS document appears as a single, contiguous line of code. Should I be using a specific configuration (or a different text editor) for reading this CSS?

Unnecessary characters have been stripped out so there’s less data to send to the player’s device. You can see the un-crunched versions here.

1 Like

EDIT x 2 - Ok, so @Draconis said the files you’re looking at are actually crunched versions. So what I wrote below 𝚒̶𝚜̶ ̶𝚙̶𝚛̶𝚘̶𝚋̶𝚊̶𝚋̶𝚕̶𝚢̶ ̶𝚗̶𝚘̶𝚝̶ may not! be relevant to this situation, but hey, it’s good to know in general.

It sounds like the line breaks might be being defined differently in the css files and in your Notepad environment.

I’ll quote the relevant part from this page on the issue, then link to the page.

" Windows, and DOS before it, uses a pair of CR and LF characters to terminate lines. UNIX (Including Linux and FreeBSD) uses an LF character only. OS X also uses a single LF character, but the classic Mac operating system used a single CR character for line breaks. In other words: a complete mess.

Problems arise when transferring text files between different operating systems and using software that is not smart enough to detect the line break style used by a file. E.g. if you open a UNIX file in Microsoft Notepad, it will display the text as if the file contained no line breaks at all. If you open a Windows file in a UNIX editor like “joe” or “vi”, you will see a control character (the CR) at the end of each line. Older versions of Perl on Linux would refuse to run any script that used Windows line breaks, aborting with an unhelpful error message.

You may be able to fix it with general settings in Notepad, import/open settings in Notepad (easier) or with a find/replace on the trouble document (if you fix the other settings, you hopefully can open a document that does not require the find/replace fix.)

-Wade

2 Likes

Thanks for this! But it looks like the scrunched version has many more specified elements within it, perhaps by thousands of characters. Maybe this unscrunched version is the bare minimum styling for the page to behave correctly?

No, I appreciate this! We could fill many threads with all that I don’t know (and I’m doing it, one thread at a time).

1 Like

The css files in the Inform template should be here instead.

1 Like

On another note, if you’re looking to unscrunch the files Inform generated, I’d recommend MDN playground (at least that’s what I always use to unscrunch CSS files). You just need to press the format button.

2 Likes

That contains what seem to be pointers to different files, but I am having trouble navigating to them.

It looks like MDN Playground renders the CSS legible! I’m going to add some line spaces for readability, but this is something I can definitely work with. Thanks for the suggestion!

(Though if there is a “canon” CSS with spacing I am curious about where to find it)

for reference

Playground | MDN

Ah, looks like I found the wrong files! My bad.

1 Like

There are two files because one is provided by the website template and one by the interpreter template.

Parchment for Inform 7 has most of the same styles as original Parchment except for loading the Iosevka font. The template’s styles are defined here: parchment/src/inform7/inform7.css at master · curiousdannii/parchment · GitHub

Basically it includes all these .CSS files except dark.css: asyncglk/src/glkote/web at master · curiousdannii/asyncglk · GitHub

3 Likes

For what it’s worth, they mentioned using Notepad++ rather than Notepad, which should have no problem handling different types of line breaks.

2 Likes

Thanks for this! I’ll have a look.