Skip to main content

The PreTeXt Guide

Section 49.1 The css Directory

All styling source lives in the top-level css directory, whose README.md is the authoritative reference. The folders are:
  • targets—each target is a self-contained final product: one entry file that compiles to one CSS file. The modern HTML themes are in targets/html, one folder per theme, named for a city (default-modern, salem, denver, greeley, boulder, tacoma). Non-web targets (epub, kindle, revealjs, the print worksheet) live here too. A file used by only one target belongs in that target’s folder.
  • components—source shared across targets, grouped by what it styles: chunks (PreTeXt containers like exercises and knowls), elements (small pieces such as figures and lists), page-parts (table of contents, navigation bar, banner), interactives (Sage, Runestone, WeBWorK), and helpers (reusable mixins). Editing a component affects every target that uses it.
  • colors—color palettes a theme can draw on, plus the master list of color variables (see Section 49.4).
  • fonts—the mechanism a theme uses to select fonts.
  • dist—the built, ready-to-use CSS files (and source maps). Generated output—never edit by hand (see Section 49.2).
  • legacy—plain CSS for older themes that predate the SCSS system, kept for backward compatibility; new work does not go here. other holds CSS that is not part of a book, such as the PreTeXt catalog.