Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
@page {
margin: 8%;
@bottom-center {
writing-mode: horizontal-tb;
font-size: 67%;
content: "– " counter(page) " –";
}
}
@page :first {
margin: 0;
@bottom-center {
content: none;
}
@top-left {
content: none;
}
@top-right {
content: none;
}
}
@page :left {
@top-left {
writing-mode: horizontal-tb;
font-size: 75%;
content: env(pub-title);
}
}
@page :right {
@top-right {
writing-mode: horizontal-tb;
font-size: 75%;
content: string(sect-title);
}
}
html, body {
margin: 0;
}
h1,h2,h3,h4,h5,h6 {
break-after: avoid;
}
img {
max-width: 100vw !important;
max-height: 100vh !important;
}
/* 以下のCSSルールは、電書協EPUB3制作ガイドなど使われている実際の日本語EPUBデータでそれなりの結果になるようにしたもの */
.p-cover img,
.titlepage img,
#cover+.full img,
body.newImgPage img.pagefit,
body.imgpage img.pagefit {
width: 100vw !important;
height: 100vh !important;
object-fit: contain;
}
.v-valign-height,
.v-valign-height02,
.v-valign-height03 {
height: 100vh !important;
}
.h-valign-width,
.h-valign-width02,
.h-valign-width03 {
width: 100vw !important;
}
h1, h2, h3, h4,
.font-120per,
.font-130per,
.font-140per,
.font-150per,
.font-160per,
.font-170per,
.font-180per,
.font-190per,
.font-200per,
.font-250per,
.font-300per {
string-set: sect-title content();
}
*:empty {
string-set: none;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment