Download Designing for digital

Transcript
So, always name your styles by their function not their appearance. For
ex ample, use ‘chapter-title’ for your main level of heading, not
‘large-bold’.
W hen you ex port your InDesign book to EPUB, your style names will
become part of the tags in the HTML code. Remember how we used a
class attribute to define a <div> as a ‘note’ in our HTML ex ample earlier?
Your style names in InDesign will be the class names in your EPUB’s
HTML. That is very important to remember!
Another important implication of this is that you should always make
your style names lower-case, and never use spaces or special characters.
So, a paragraph styled with a style called ‘note’ in InDesign will look like
this in your EPUB’s HTML:
<p class=”note”>
Your note text goes here.
</p>
Technically, InDesign is categorising that paragraph with a class that
uses the style name you chose: ‘note’. In the CSS InDesign creates for you,
it will define the appearance of that class of paragraph much like this:
p.note {
font-family: “Helvetica”;
font-size: 10pt;
}
(W hen creating CSS, InDesign tries to create CSS styles that follow the
appearance of your InDesign styles, but the result won’t be ex actly the
43