Skip to content

Commit

Permalink
Update core.css, add se.css, and update SE boilerplate files
Browse files Browse the repository at this point in the history
  • Loading branch information
acabal committed Sep 10, 2020
1 parent 5dae1cd commit 5697bbb
Show file tree
Hide file tree
Showing 6 changed files with 111 additions and 95 deletions.
1 change: 1 addition & 0 deletions src/epub/content.opf
Expand Up @@ -96,6 +96,7 @@
<item href="toc.xhtml" id="toc.xhtml" media-type="application/xhtml+xml" properties="nav"/>
<item href="css/core.css" id="core.css" media-type="text/css"/>
<item href="css/local.css" id="local.css" media-type="text/css"/>
<item href="css/se.css" id="se.css" media-type="text/css"/>
<item href="images/cover.svg" id="cover.svg" media-type="image/svg+xml" properties="cover-image"/>
<item href="images/logo.svg" id="logo.svg" media-type="image/svg+xml"/>
<item href="images/titlepage.svg" id="titlepage.svg" media-type="image/svg+xml"/>
Expand Down
106 changes: 14 additions & 92 deletions src/epub/css/core.css
Expand Up @@ -2,6 +2,7 @@
@namespace epub "http://www.idpf.org/2007/ops";

body{
font-variant-numeric: oldstyle-nums;
hyphens: auto;
-epub-hyphens: auto;
}
Expand Down Expand Up @@ -29,7 +30,8 @@ h2,
h3,
h4,
h5,
h6{
h6,
hgroup{
font-variant: small-caps;
hyphens: none;
-epub-hyphens: none;
Expand All @@ -39,6 +41,15 @@ h6{
margin: 3em 0;
}

hgroup > *{
font-weight: normal;
margin: 0;
}

hgroup > *:first-child{
font-weight: bold;
}

blockquote + p,
h2 + p,
h3 + p,
Expand All @@ -50,7 +61,9 @@ hr + p,
ol + p,
ul + p,
table + p,
hgroup + p,
p:first-child{
hanging-punctuation: first last;
text-indent: 0;
}

Expand Down Expand Up @@ -107,94 +120,3 @@ a[epub|type~="noteref"]{
section[epub|type~="endnotes"] > ol > li{
margin: 1em 0;
}

section[epub|type~="colophon"],
section[epub|type~="imprint"]{
text-align: center;
}

section[epub|type~="colophon"] header,
section[epub|type~="imprint"] header{
line-height: 0;
margin-top: 3em;
}

section[epub|type~="colophon"] h2,
section[epub|type~="imprint"] h2{
display: none;
}

img[epub|type~="z3998:publisher-logo"]{
max-width: 25%;
}

section[epub|type~="colophon"] p,
section[epub|type~="imprint"] p{
margin: 1em auto 0 auto;
text-indent: 0;
}

section[epub|type~="imprint"] p{
font-size: .75em;
text-align: justify;
width: 75%;
}

section[epub|type~="colophon"] p + p::before{
border-top: 1px solid;
content: "";
display: block;
margin: auto auto 1em auto;
width: 25%;
}

section[epub|type~="colophon"] a{
font-variant: small-caps;
}

section[epub|type~="imprint"] a,
section[epub|type~="colophon"] a{
hyphens: none;
-epub-hyphens: none;
}

section[epub|type~="copyright-page"] p{
margin: 1em auto;
text-indent: 0;
}

section[epub|type~="copyright-page"] blockquote p{
font-style: italic;
text-align: left;
text-indent: 0;
}

section[epub|type~="copyright-page"] blockquote p span{
display: block;
padding-left: 1em;
text-indent: -1em;
}

section[epub|type~="copyright-page"] blockquote br{
display: none;
}

@supports(display: flex){
section[epub|type~="imprint"]{
align-content: center;
display: flex;
flex-direction: column;
justify-content: center;
min-height: calc(98vh - 3em);
padding-top: 3em;
}

section[epub|type~="imprint"] header{
margin-bottom: 2em;
margin-top: 0;
}

img[epub|type~="z3998:publisher-logo"]{
max-width: 25vw;
}
}
93 changes: 93 additions & 0 deletions src/epub/css/se.css
@@ -0,0 +1,93 @@
@charset "utf-8";
@namespace epub "http://www.idpf.org/2007/ops";

section[epub|type~="colophon"],
section[epub|type~="imprint"]{
text-align: center;
}

section[epub|type~="colophon"] header,
section[epub|type~="imprint"] header{
line-height: 0;
margin-top: 3em;
}

section[epub|type~="colophon"] h2,
section[epub|type~="imprint"] h2{
display: none;
}

img[epub|type~="z3998:publisher-logo"]{
max-width: 25%;
}

section[epub|type~="colophon"] p,
section[epub|type~="imprint"] p{
margin: 1em auto 0 auto;
text-indent: 0;
}

section[epub|type~="imprint"] p{
font-size: .75em;
text-align: justify;
width: 75%;
}

section[epub|type~="colophon"] p + p::before{
border-top: 1px solid;
content: "";
display: block;
margin: auto auto 1em auto;
width: 25%;
}

section[epub|type~="colophon"] a{
font-variant: small-caps;
}

section[epub|type~="imprint"] a,
section[epub|type~="colophon"] a{
hyphens: none;
-epub-hyphens: none;
}

section[epub|type~="copyright-page"] p{
margin: 1em auto;
text-indent: 0;
}

section[epub|type~="copyright-page"] blockquote p{
font-style: italic;
text-align: left;
text-indent: 0;
}

section[epub|type~="copyright-page"] blockquote p span{
display: block;
padding-left: 1em;
text-indent: -1em;
}

section[epub|type~="copyright-page"] blockquote br{
display: none;
}

@supports(display: flex){
section[epub|type~="imprint"]{
align-content: center;
display: flex;
flex-direction: column;
justify-content: center;
min-height: calc(98vh - 3em);
padding-top: 3em;
}

section[epub|type~="imprint"] header{
margin-bottom: 2em;
margin-top: 0;
}

img[epub|type~="z3998:publisher-logo"]{
max-width: 25vw;
}
}
2 changes: 1 addition & 1 deletion src/epub/text/colophon.xhtml
Expand Up @@ -3,7 +3,7 @@
<head>
<title>Colophon</title>
<link href="../css/core.css" rel="stylesheet" type="text/css"/>
<link href="../css/local.css" rel="stylesheet" type="text/css"/>
<link href="../css/se.css" rel="stylesheet" type="text/css"/>
</head>
<body epub:type="backmatter">
<section id="colophon" epub:type="colophon">
Expand Down
2 changes: 1 addition & 1 deletion src/epub/text/imprint.xhtml
Expand Up @@ -3,7 +3,7 @@
<head>
<title>Imprint</title>
<link href="../css/core.css" rel="stylesheet" type="text/css"/>
<link href="../css/local.css" rel="stylesheet" type="text/css"/>
<link href="../css/se.css" rel="stylesheet" type="text/css"/>
</head>
<body epub:type="frontmatter">
<section id="imprint" epub:type="imprint">
Expand Down
2 changes: 1 addition & 1 deletion src/epub/text/uncopyright.xhtml
Expand Up @@ -3,7 +3,7 @@
<head>
<title>Uncopyright</title>
<link href="../css/core.css" rel="stylesheet" type="text/css"/>
<link href="../css/local.css" rel="stylesheet" type="text/css"/>
<link href="../css/se.css" rel="stylesheet" type="text/css"/>
</head>
<body epub:type="backmatter">
<section id="uncopyright" epub:type="copyright-page">
Expand Down

0 comments on commit 5697bbb

Please sign in to comment.