mnmlst (“Minimalist” or “Minimal Stylesheet”) is an existentialist CSS framework for eBooks. It doesn’t really help you, it immerses you in an absurd world in which some RS “!important all the things” and abuse the universal selector to override your styles, destroying the fundamental concept of cascade in doing so.
Beware and tamper with mnmlst at your peril.
approach
- mnmlst has minimum impact: it relies on the Reading Systems’ defaults you can’t trust, it only corrects their oversights (e.g. disabling hyphens for headings, resetting HTML5 block elements, applying
max-width
for images, etc.).
- mnmlst is freaking light: the minified css is just 853 bytes. You can achieve your custom typography in less than 2 kilobytes (beautified).
- mnmlst is functional: it follows FCSS principles and provides single-purpose/reusable classes by default, it doesn’t declare styles for elements directly (excepted oversights).
- mnmlst is a toolbox: the framework was designed using LESS CSS, it offers multiple tools and can be customized.
Out of the box, mnmlst doesn’t override anything, whether the defaults are pretty good or absolutely terrible.
Nope, nothing.
Its approach could be abstracted to “If it’s broke beyond repair, don’t try to fix it.” It’s up to you to make use of the single-purpose classes or, should you be a nihilist, just load the stylesheet and claim the job done.
Existentialism at its best.
typography
mnmlst’s typography is simplistic:
- no
font-family
is declared, the default will be used (either the Reading System’s or the user’s);
- the
line-height
is declared for body
as a %
value; it’s like setting a baseline grid in InDesign: all other elements will inherit the computed value, as if the correct ratio/em value was automatically recomputed for each element, depending on its font-size
);
- a
line-height
override is automatically pushed when the font-size
of the class/element is bigger that the inherited line-height
;
- the modular scale is diatonic—cos’, well, it’s been proving its worth for the last 400 years and that speaks volumes.
- pagebreaks and alignments can be managed using functional classes as well.
You can obviously build on top of it. Once again, it’s up to you.
the less design system
mnmlst might look simplistic at first sight but that’s only because its beauty lies in the LESS folder.
In there you’ll find simple but powerful tools to customize the default css, which is actually just a foundation.
- You can automate vertical rhythm using mixins (i.e.
margin
and padding
in both em
or rem
).
- You can customize typesetting by using any functional class you’ll find in the default CSS and additional utilities (small caps, text decoration, link color, etc.).
- You can build wrappers and apply borders, background color, etc.
- You can embed preset packages (namespaces) for
hr
, sup
, sub
, etc.
- You can use plugins to generate:
@font-face
“imports” which behave well in eBooks’ Reading Systems;
- specific eBook font-stacks that were fine-tuned after extended research;
- minimalistic tables which won’t break vertical rhythm;
- code with numbered lines;
- vertically centered images—it takes little effort to customize it for headings, etc;
- image grids—it takes little effort to customize it for toc entries, etc;
- a swiss style freeform system;
- color palettes;
- design helpers (reading modes, baseline grid, pagination…).
All it takes is a basic understanding of the LESS language.
the waste mnmlst doesn’t support
- Good Old Kindle Mobi7.
- A shitload of apps supporting ePub, especially on Android, because they don’t even support HTML & CSS very well—as a reminder, ePub is using these two languages, which makes the claim of supporting ePub a fucking joke in the first place.
- Web browsers, because they can’t open an ePub file natively.
- Your refusal of responsibility.