Skip to content

Instantly share code, notes, and snippets.

@jizusun
Last active November 11, 2018 03:55
Show Gist options
  • Save jizusun/814c4e22ada30d8ae0a82c15b9843f8b to your computer and use it in GitHub Desktop.
Save jizusun/814c4e22ada30d8ae0a82c15b9843f8b to your computer and use it in GitHub Desktop.
CSS for Calibre on Windows (Setting the font size, background-color etc.)
/*
Source: https://gist.github.com/jizusun/814c4e22ada30d8ae0a82c15b9843f8b
From: https://www.itsecmedia.com/blog/post/calibre-ebook-reader-font-smoothing/
*/
body,
body.calibre{
font-size: 1em !important;
font-weight: bold !important;
font-smooth: auto;
/* text-shadow: 0 0 4px rgba(0, 0, 0, 0.4); */
text-rendering: auto;
font-family: "华文中宋", Calibre, Helvetica, Arial, "Segoe UI", Consolas, "Microsoft Yahei", sans-serif !important;
margin: 0em !important;
background-color: rgb(219, 238, 221);
}
body > div {
margin: 1em !important;
padding: 1em 0 !important;
}
code, pre, .pre, .program {
font-family: Consolas, "Courier New", monospace !important;
font-size: 1em !important;
font-weight: 500 !important;
font-smooth: auto;
}
div.figure {
margin: 2em 0 !important;
}
div.note {
padding: 1em !important;
margin: 2em 0 !important;
}
div.list {
margin: 1em !important;
}
@jizusun
Copy link
Author

jizusun commented Nov 11, 2018

Preview:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment