Fan of creative technology, elearning, instructional design and a little geeky

Style Group Names to CSS prefix

When working on EPUB output from InDesign, the stylesheet names in the generated CSS can become quite long, at the same time the number of styles for more complex documents can increase quickly. So I’ve started placing paragraph styles in particular in Style Groups that are named with short names.
When InDesign generates the CSS file the Style Group names turn into prefixes for the class names.
Here’s an example:

  • I name the Paragraph Style Group based on where the style is applied. For instance styles that are used within body cells of a table would appear in a Style Group named ‘td‘.
  • Within the Style Group, the paragraph styles names themselves also have short names. E.g. text-blue

When applying the paragraph style “text-blue” to some text in a table cell, the resulting stylesheet in the CSS will become:
p.td-text-blue {
}

Similar posts
  • Adobe InDesign and XML: A Reference Guide The following is a reference guide I have compiled over time for those of you who are looking at doing a little more with XML in InDesign (originally published Feb. 2011, last updated Feb 2018). If you have any extra information you’d like to see added to this guide, feel free to message me. Mapping XML tags to InDesign [...]
  • How to change the colour of bullet points in InDesig... A few weeks ago I recorded a short quick tip tutorial. InDesign’s Control panel, gives users a quick and easy way to format text as a bulleted list. Highlight the text, and click the Bulleted List button in the Paragraph Formatting Controls mode for the Control panel. This applies a universal bullet character as the [...]
  • Creating a pop-up window in a PDF with Adobe InDesig... In the following YouTube tutorial, we’ll create an interactive PDF from Adobe InDesign, in which we click on a button, which in turn opens up a simple pop-up window containing a close-box. When the close-box is clicked the pop-up window disappears [...]
  • InDesign: Facing pages with odd-numbered left pages Back in 2004 I wrote a tip for InDesign CS on how you could have the first page of your document be a left page AND have it start with page number 1. It’s hard to believe this is almost a decade ago… But a recent question on Facebook, made me think I should really [...]
  • Negative Lookbehind – GREP for Designers This is the fourth and final blog-posts in a series of posts on lookaheads and lookbehinds in GREP, written after speaking at the Perth InDesign User Group. My speaker notes are also available: What is GREP? (PDF download) (2.4Mb). In the previous three posts I briefly introduced GREP, and we took a look at Positive [...]

No Comments Yet

Leave a Reply

Your email address will not be published. Required fields are marked *