Two years would be an incredible amount of wasted time if all you’re doing is learning enough to tweak your Scrivener generated ebooks to get a little more out of the software. Nobody was suggesting that!
In fact a lot of the CSS you may find around here won’t require any understand of it at all, and can be copied and pasted straight into the CSS compile format pane blindly.
The CSS part
What you need to know can be learned in five minutes, with these few ingredients:
-
CSS formatting looks like:
thing { stuff }
-
The part including and inside of the curly brackets are the bits you find on the Web on websites or forums. You don’t need to understand anything about what goes on inside them to copy and paste them into Scrivener and make them work. Find a nice looking drop-cap that somebody made? Copy and paste the brackets part into your compile format’s CSS pane on a new line. It might have many lines, this fine.
-
The “thing” part can be quite simple, and for what Scrivener does you only need to know one basic way of using it: that is the “dot name” way of describing something. “.name” means you want to format all the things in your ebook that have been named a certain way.
Therefore to put two and two together:
.name { page-break-before: always; }
That’s it! You now know enough about CSS to add page breaks to styled text called “Name” (which isn’t terribly useful, so let’s move on to that).
The Scrivener Part
So how do we know what Scrivener will name things, what to type after the dot? Every time you use a style, either in the main editor or in the compile Format, it is going to take the human-friendly name you gave it and turn it into a CSS-friendly name. You can think of that as: make it lower case, delete all punctuation and turn any spaces into hyphens. A style named “Full Page Image” becomes “full-page-image”.
Now that you have the name, you know what to type into the CSS pane before you paste the curly-bracket stuff you found on the Internet (like the above):
.full-page-image { page-break-before: always; }
As an aside, as you can see here, a lot of stuff in the curly-brackets in CSS does not require any training at all to deduce to see what is going on. Like this example, it is often practically plain-english, if a bit Latin in form.
Surely you will encounter some samples on the Web that make use of formatting attributes that aren’t obvious, and sometimes you’ll see combinations of things that don’t make sense, but a lot will, including maybe even some of our examples in the Ebook compile format. I bet you could figure out how to make the borders around your bordered titles just a little thicker, now that you know the above.
Getting rid of the guesswork
The last thing worth knowing about here is that the most unpredictable part about all of the above is really knowing what Scrivener will do to name something—but that can be avoided, as this is something you are optionally in full control of:
-
Styles: in the compile format options pane, make note of the CSS class name text field in the right column of options for each style. Type in ‘banana’ and now you can use ‘.banana’. If a style name doesn’t convert the way you thought it should, that can be an easier approach than trying to figure out what Scrivener did do for you.
-
Section Layouts: under the Settings tab you’ll find a field by the exact same name. If you type something into here then that instructs Scrivener to put a special container around all of the text in that section and then name it.
While not directly related to breaking page flow, while you’re here in the Section Layout pane, click on the New Pages tab and reread what might have always been glazed over, Add “first-letter” span style to first letter".
Knowing that name, you can now type your “.first-letter” bit into the CSS pane on a new line, and then copy and paste someone’s complicated and pretty drop-cap style into your book.
There you go, if that took more than five minutes, my apologies, but whatever it did take, I bet it’s about the same as what it would take to learn just enough InDesign to do similar. And unlike the latter you’re learning how to do what InDesign itself does, meaning you don’t need hundreds per year to keep doing it, all you need is your compile format editor.