Quote:
Originally Posted by JSWolf
This is some rather poor CSS generated by the atrocious program Vellum. Try using that CSS in the first post of this thread and watch it fail. This CSS uses not much you can pre-edit. You need to do the editing by hand. That's why the CSS I add has not all that many classes.
Spoiler:
Code:
/*
* Little Shattered Dreams
* Stylesheet generated by Vellum
*/
@font-face {
font-family: Montserrat;
font-weight: normal;
font-style: normal;
src: url(../fonts/Montserrat-Regular.ttf);
}
@font-face {
font-family: Montserrat;
font-weight: 500;
font-style: normal;
src: url(../fonts/Montserrat-Medium.ttf);
}
@font-face {
font-family: Montserrat;
font-weight: bold;
font-style: normal;
src: url(../fonts/Montserrat-Bold.ttf);
}
p {
margin-bottom: 0;
text-indent: 0;
line-height: 1.4;
margin-top: 0;
text-align: justify;
}
p.subsq {
text-indent: 1.5em;
}
.implicit-break {
margin-top: 1.4em;
margin-bottom: 0;
height: 0;
}
.element-bodymatter .text > .implicit-break {
margin-bottom: 1.4em;
clear: both;
margin-top: 0;
height: 1.4em;
}
.toc-item p, .heading h1 {
line-height: 1.2 !important;
}
.toc-item {
margin-bottom: 0.1em;
page-break-inside: avoid;
}
div.alignment-block.inset-block {
margin-right: 1.5em;
margin-left: 1.5em;
}
ul {
padding-left: 3em;
padding-right: 1.5em;
margin-top: 1.4em;
margin-bottom: 1.4em;
clear: left;
}
p, li {
hyphens: auto;
adobe-hyphenate: auto;
-webkit-hyphens: auto;
-webkit-hyphenate-limit-lines: 2;
-webkit-hyphenate-limit-after: 4;
-webkit-hyphenate-limit-before: 4;
}
body {
font-family: Palatino, serif;
font-weight: normal;
font-style: normal;
}
h1, h2 {
margin-top: 0;
margin-right: 0;
margin-bottom: 0;
margin-left: 0;
page-break-inside: avoid;
font-kerning: auto;
}
@page {
margin-left: 24px;
margin-right: 24px;
}
a, a * {
color: rgb(36, 39, 116);
}
a, span.underline {
text-decoration: underline;
}
li {
line-height: 1.4 !important;
text-align: left;
}
.implicit-break {
page-break-inside: avoid;
}
.alignment-block {
clear: both;
}
.element-type-epigraph.element-without-heading {
margin-top: 10em;
}
.element-type-also-by .heading .title-block, p.copyright-content {
font-size: 90%;
}
.heading-container-single h1.element-title, .heading-alignment-fixed .element-title, p.alignment-block-content-center {
text-align: center;
}
p.also-by-content {
text-indent: 0;
font-size: 90%;
text-align: center;
}
p.also-by-content, p.also-by-content.alignment-block-content {
margin-top: 0.5em;
}
.cover-image {
max-width: 100%;
max-height: 100%;
display: block;
margin-left: auto;
margin-right: auto;
}
.toc-contents {
padding-left: 5%;
padding-right: 5%;
}
p.toc-content {
text-align: left;
font-size: 90%;
}
.toc-item.has-no-children .toc-item-title {
text-indent: -1.5rem;
padding-left: 1.5rem;
}
.toc-backmatter-group {
margin-top: 0.75em;
}
h2.title-page-contributor-without-introduction {
margin-bottom: 0.5em;
}
.element-type-toc .heading .title-block {
font-size: 95%;
}
p.copyright-content {
text-indent: 0;
text-align: left;
margin-top: 0.75em;
}
.element-type-copyright.element-without-heading {
margin-top: 2.5em;
}
div.title-page {
text-align: center;
margin-right: 2%;
margin-left: 2%;
}
div.title-page .title-page-title-subtitle-block {
margin-left: 6%;
margin-right: 6%;
}
div.title-page-title-subtitle-block {
min-height: 140px;
margin-top: 140px;
margin-bottom: 2em;
}
h1.title-page-title, h2.title-page-contributor {
font-weight: normal;
text-align: center;
margin-top: 0;
margin-right: 0;
margin-bottom: 0;
margin-left: 0;
line-height: 1.2 !important;
}
h1.title-page-title {
font-size: 150%;
text-transform: uppercase;
}
div.title-page-contributor-block {
min-height: 80px;
margin-bottom: 1.5em;
}
h2.title-page-contributor-primary, .heading-format-reduced .element-title {
font-size: 120%;
}
.heading-container-single {
text-align: center;
margin-left: 6%;
margin-right: 6%;
letter-spacing: 0.03em;
}
.heading-size-full {
min-height: 12em;
}
.heading-size-full.heading-without-image .heading-contents {
padding-top: 4.5em;
}
.heading-size-small .heading-contents {
padding-top: 2em;
}
.heading {
margin-bottom: 2em;
}
.heading-alignment-fixed {
margin-left: 6%;
margin-right: 6%;
text-align: center;
}
.heading-size-small .title-subtitle-block, .heading-size-small .title-subtitle-block .title-block, .heading-size-small .title-subtitle-block .element-number-block {
padding-top: 0;
}
.heading-container-single .element-title {
font-size: 130%;
}
.heading-format-full .element-number-block {
min-height: 1.75em;
}
h2.title-page-contributor span.title-page-contributor-name, .element-title {
text-transform: uppercase;
}
.element-title, h1.title-page-title {
font-family: Montserrat, sans-serif;
font-weight: bold;
font-style: normal;
}
h2.title-page-contributor span.title-page-contributor-name {
font-family: Montserrat, sans-serif;
font-weight: 500;
font-style: normal;
}
div.alignment-block {
margin-top: 1.4em;
margin-bottom: 1.4em;
}
p.alignment-block-content {
text-indent: 0;
margin-top: 0;
}
p.alignment-block-content-left {
text-align: left;
}
|
Whereas I actually find Vellum created ebooks to be relatively easy to clean up since while the CSS may be crap but it's consistent crap.
The work flow is:
- download and add to calibre
- use KindleUnpack if an Amazon format ebook to produce an epub.
- update metadata, update cover, edit as/if needed.
- use ModifyEpub to update metadata/cover in the epub, remove embedded fonts, etc.
- open in Sigil and replace the media.css with my heavily modified one.
- remove the various Amazon media queries in the HTML files. Some authors use the Kindle epub for all vendors.
- run my first pass task list.
- clean up the CSS files removing much redundancy using a saved search.
- replace the p and .subsq with my preferred code in the style.css.
- run the second pass task list.
- clean up empty div and span tags using TagMechanic.
- take a quick look for any oddities that survived.
The total elapsed time is about 10-15 minutes.
I prefer to read left justified (AKA ragged right) so remove any text-align: justified bits. Since Vellum uses a class for indented paragraphs, I live with that though my personal preference is the default paragraph is indented since there are so many more of them in most ebooks.
Code:
body {
display: block;
font-size: 1em;
margin: 0 0 0 0;
padding: 0 0 0 0;
text-indent: 0;
widows: 1;
orphans: 1;
}
p {
text-indent: 0;
margin: 0 0 0 0;
padding: 0.1em 0 0 0;
}
p.subsq {
text-indent: 4%;
}