How mattharrison/epub-css-starter-kit works
Project type and purpose
• This is an open-source CSS starter kit (library) for building EPUB-compatible stylesheets.
• It provides a base.css (compiled) and base.sass (source) to be used in EPUB authoring workflows (e.g., rst2epub, kindlegen).
File structure
• Top-level:
• README.rst – project overview, focus platforms, usage instructions
• notes.rst – internal notes or future ideas
• css/ – distribution folder containing compiled CSS
– base.css
• sass/ – source folder for maintainable SASS
– base.sass
• No traditional “frontend/backend” split—this is a styling library.
• No build scripts shown, but implied SASS→CSS compilation step.
README for additional insights
• Purpose: produce a CSS that “just works” across Kindle (.mobi), Nook, and iBooks.
• Workflow references: rst2epub, kindlegen, sample HTML/CSS tests, issue triage for reader/platform bugs.
a. Main components
• Source assets: sass/base.sass
• Build step: SASS compiler (e.g., sass CLI, libsass)
• Distribution assets: css/base.css
• Consumer tool: EPUB packager (e.g., rst2epub2)
• Converter: kindlegen / Calibre (epub→mobi)
• Target: eReader devices (Kindle, Nook, iBooks, etc.)
• Issue tracker / GitHub (for bug reports and patches)
b. Relationships and interactions
• Developer writes/edits .sass → passes into SASS compiler → outputs .css
• Book-authoring tool injects base.css into HTML/XHTML → packages into .epub
• Converter ingests .epub (with base.css) → outputs .mobi/.azk (Kindle)
• eReader opens the package and applies base.css → renders to user
• Issues flow back from reader testing into GitHub issues, driving patches to .sass
c. Architectural patterns / design principles
• Source-artifact separation (SASS source vs. compiled CSS)
• Single responsibility: CSS kit focuses exclusively on styling cross-reader EPUBs
• Extensibility: downstream authors can layer custom CSS atop the starter kit
• Feedback loop: issue tracker drives iterative CSS adjustments
d. Key technologies / libraries
• SASS (preprocessor)
• CSS (distribution)
• rst2epub2, Pandoc, Calibre/kindlegen (packaging & conversion)
• GitHub (source, issues)