An eBook framework (CSS + template) whose mantra is “finding simple solutions to complex issues.”
All the Blitz repositories reached End Of Life on July 1, 2020. The entire project is no longer maintained and its repositories are read-only. You can still fork them if they can be useful to you.
Blitz is released under MIT Licence © 2016, Jiminy Panoz.
There are various ways to use blitz, from adding the available stylesheets (
CSS folder) to building them with the LESS framework.
You can either add
blitz.css or an alternative stylesheet in your EPUB file.
blitz.css is commented but you’ll find an uncommented version in the
AltStylesheets folder (which helps you save some 7kb).
In this folder, you’ll also find
blitz-reset.css (normal + minified).
blitz-lite.cssshould be enough for simple books like novels and essays (it’s 3kb);
blitz-reset.cssis just… the reset we’ve designed (it’s 1kb).
Add styles on top of those two is up to you… But you’ll then miss the powerful tools we’ve built in LESS!
First go to the blitz root directory and install the dev dependencies:
Then make your changes in LESS and run:
npm run build
This will compile the LESS src to the default, lite and reset stylesheets, and update the template.
If you want to compile only one stylesheet you can run:
build:defaultfor the default output (
blitz.css) – that will update the template’s unzipped src too;
build:litefor the lite output (
build:resetfor the reset output (
All those sub-builds will generate uncommented/minified files as well.
Finally, to update the packaged EPUB file then use
npm run make.
Either use the GUI or, if you’re one of the old-school type…
lessc Blitz_framework/LESS/blitz.less Blitz_framework/CSS/blitz.css
lessc Blitz_framework/LESS/blitz-lite.less Blitz_framework/CSS/AltStylesheets/blitz-lite/blitz-lite.css
lessc Blitz_framework/LESS/blitz-reset.less Blitz_framework/CSS/AltStylesheets/blitz-reset/blitz-reset.css
Blitz was designed to deal with the significant obstacles a newcomer or even an experienced producer might encounter. Its major goals are:
We have chosen a functional approach (FCSS) but LESS presets are planned to provide meaningful class names depending on eBook’s type (poetry, plays, etc.).
Blitz is leveraging the concept of inheritance. Values
currentColor are being used extensively to make the framework compatible with Reading Systems’ default stylesheets, reading modes (
color) and user settings (
Defaults and a reset do the heavy lifting so it’s just about building on top of this base. Please note Blitz is taking care of defaults RS aren’t necessarily (HTML5 block elements, hyphens and pagebreaks for selected elements, etc.).
Finally, although we try to rely on RS’ typefaces, typography has been fine tuned.
font-size, typeface used, etc.)
padding) is automatically computed in LESS to enforce consistency. By taking care of vertical rhythm, we’re also achieving horizontal harmony when the eBook is rendered on a (fake) spread: “everything text” lines up on the same baseline grid, which makes for a more comfortable reading experience.
substyling is improved to prevent them from affecting line-height.
To sum up, we’ve tried to find a balance and feel like Blitz defaults can help producers get around a lot of possible issues: we don’t need hacks, we don’t have to change values in specific situations using complex media queries.
ie >= 11 edge >= 14 last 4 chrome major versions safari >= 9.1 ios_saf >= 9.3 android >= 4.4 last 2 and_chr major versions
Alternatively, you can use this CanIuse Link.
When checking for support, you can simply click “Apply Filters” in order to display those browsers in the support table.
Blitz was sunset in 2020. As of July 1, 2020 the entire project is no longer maintained and its repositories read-only. You can still fork them.
We deemed Blitz feature-complete though, and it should consequently be still useful for a couple of years.
At some point, sponsoring was considered but quickly dismissed due to the relatively small size of the ebook production community: it was simply too much to ask.
Quite a lot, actually.
epub:typeto DPUB ARIA, clean DTP outputs’ markup, etc. (would have required GUI since everyone is not comfortable with the command-line and npm).
But maybe you could successfully build a business out of that list…
By improving support for the 24 additonal languages we added at some point, Blitz would better cover the needs and requirements of 3,049,150,507 speakers.
A library of custom elements almost happened after successful initial testing, but one careful review later, it was clear most authors wouldn’t even bother trying such a library. That wasn’t a hill to die on when most authors want Reading Systems to handle that out of the box.
.line-throughstatic mixin in utilities
With massive props to @ptmkenny for internationalization and config improvements.
min-light-heightas a variable (for Kindle)
padding-leftfor lists (switched to relative
ems) so that markers can’t be cropped
pxvalue instead of
%as it depended on RSs’ forcing a relayout)
page-break-inside: avoidcan create a blank
.small-capsand created a new
hiddenattribute to improve backwards compatibility;
hr.transition(won’t screw up vertical rhythm because margins any longer);
-webkit-localenow an override (issue #9).
limit-lines, tabular numerals,
vhare now available