-
Notifications
You must be signed in to change notification settings - Fork 2
Custom CSS & Fonts
NOTE:
After adding fonts or CSS, you will need to close and reopen Hyphen for your changes to take effect.
Adding fonts is as simple as dropping them into Hyphen's Documents in iTunes (or iFunBox). They'll then appear under the Font List. Both .otf
and .ttf
fonts are supported.
Hyphen currently only accepts a single .css
file placed in its Documents folder. You can use additional assets like images as well by specifying the proper (relative) path to them. This CSS file will be applied to all books.
You may find that sometimes your CSS properties don't appear to have any effect. In these cases, using the !important
declaration will often solve the problem, e.g.:
body {
font-size: 2000px; /* doesn't work */
font-size: 2000px !important; /* works */
}
There are times when you might want to use certain styling in a particular case. Hyphen provides two selectors to make this easier, for both Night Mode and Footnotes.
Using the html.hyphen-night-mode
selector. For example:
/* makes all images grayscale */
html.hyphen-night-mode img, html.hyphen-night-mode svg {
-webkit-filter: grayscale(1); /* or */
-webkit-filter: grayscale(1) invert(1);
}
Using the html.hyphen-footnote
selector. For example:
/* Increases the font size: */
html.html.hyphen-footnote {
font-size: 50px !important;
}
Twitter: @hyphenreader | Email: hyphenreader@gmail.com