Tinderbox Forum

Tinderbox Cookbook, css-files

I guess this has been discussed earlier, but I cannot find any references.
I’m trying to work my way through the Tinderbox Cookbook. Under the “Boilerplate” heading and in the “styles” note there is a reference to a cookbook.css file. HTML/CSS is not my cup of tea, but it feels like this file should have been included, at least to give a better understanding of definition of different classes used in different templates.

Here you go.

You can link to CSS file, as in this sample, or see option 2, where you put the CSS in the template.

Option 1: You use export code, specify the attribute name for the text and then you’re telling Tinderbox to insert the context of text from the CSS file named “CSSSample”.


Option 2:

This example uses the export code ^if()^TEXT^else^TEXT^endif^ statement to demonstrate levels. There are a lot more useful and advanced ways to do this, but this shows the basic.

Note: One of the fastest ways to swap templates is with the document inspector. You select a note and then chose the template you want to apply.

Here is a sample file:
TBX L - Simple CSS and Conditional Exprot Code Example.tbx (114.2 KB)

Thanks you for your reply.
I think I understand your example and I see your included (“CSSSample”).
Opening the Tinderbox Cookbook there is several references to the “css/cookbook.css” note, problem is I cannot find this file. I would like to, because I think I could benefit from viewing it and improve on my knowledge of Tinderbox.

Looking at the v8.2.1b410 (the last update I made, I think you are right. I’ll take a look (slowly—from a very bouncy train <sigh>).

Aha, grab a copy of this: export folder layout.zip (225.4 KB)

Unzip, and export the Cookbook into that folder (keep the zip so you can make new copies!)

The cookbook goes back some years (witness the v8.2.1 latest baseline) and was not deigned for internal preview use, so you need to export and I quite understand not having all the files causes some confusion!

When I’m back from travelling, I’ll see if I can make a copy of the TBX that exports the CSS (and those of the support files where it makes sense to do so.

A reason the TBX Cookbook hasn’t been touched in a while as that action code haas increased in scope and complexity so adding more testers is a big job (and I was the only active contributor to it). Also the design doesn’t lend itself to the use of the internal preview.

†. Ah, I see the online version of the cookbook, is even older - v7.3.2. But the zip file above should still work with it.

1 Like

Here is a Dropbox (download) link to the v8.2.1 version of the cookbook, in case it helps. :slight_smile:

1 Like

Thank you @mwra, my study will now proceed and knowledge may be accumulated (slowly).

1 Like