View Single Post
Old 08-21-2022, 06:22 PM   #58
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 46,921
Karma: 169810634
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by JSWolf View Post
Here is the code for a simple centered chapter number. after that one of two CSS from a Kindle eBook made with Vellum.

Code:
  <div id="chapter-11" class="element element-bodymatter element-container-single element-type-chapter element-with-heading full-character-formatting" role="doc-chapter" epub:type="chapter">
    <div class="heading heading-with-title heading-without-image">
      <div class="heading-contents">
        <div class="title-subtitle-block title-block-title-is-element-number">
          <h1 class="number-and-title case-upper"><span class="title case-upper">11</span></h1>
        </div>
      </div>
    </div>
If you look at the mass of media queries in Vellum's media.css, you realize that they are attempting to produce books that look good on multiple platforms without needing the user to produce multiple versions. So you end up with a mass of media queries allowing different formats (epub, mobi, KF8) to be targetted along with a mass of screen sizes, etc. I admit to wondering about the screen size with a max-height of 380px, etc. since I haven't seen many ereaders with such a small screen since I stopped reading on my Blackberry.

If I remove the media queries and try generating epub, mobi and KF8 copies, the media query bound versions look a lot better for mobi.

Compare this to a recent anthology I purchased which has 202 stylesheets all containing the following:
Spoiler:
Code:
			@page Section1 { size:378pt 576pt; margin:54pt 36pt 54pt 54pt }
			div.Section1 { page:Section1 }
			@page Section2 { size:378pt 576pt; margin:54pt 36pt 54pt 54pt }
			div.Section2 { page:Section2 }
			@page Section3 { size:378pt 576pt; margin:54pt 36pt 54pt 54pt }
			div.Section3 { page:Section3 }
			@page Section4 { size:378pt 576pt; margin:54pt 36pt 54pt 54pt }
			div.Section4 { page:Section4 }
			@page Section5 { size:378pt 576pt; margin:54pt 36pt 54pt 54pt }
			div.Section5 { page:Section5 }
			@page Section6 { size:378pt 576pt; margin:54pt 36pt 54pt 54pt }
			div.Section6 { page:Section6 }
			@page Section7 { size:378pt 576pt; margin:54pt 36pt 54pt 54pt }
			div.Section7 { page:Section7 }
			@page Section8 { size:378pt 576pt; margin:54pt 36pt 54pt 54pt }
			div.Section8 { page:Section8 }
			@page Section9 { size:378pt 576pt; margin:54pt 36pt 54pt 54pt }
			div.Section9 { page:Section9 }
			@page Section10 { size:378pt 576pt; margin:54pt 36pt 54pt 54pt }
			div.Section10 { page:Section10 }
			@page Section11 { size:378pt 576pt; margin:54pt 36pt 54pt 54pt }
			div.Section11 { page:Section11 }
			@page Section12 { size:378pt 576pt; margin:54pt 36pt 54pt 54pt }
			div.Section12 { page:Section12 }
			@page Section13 { size:378pt 576pt; margin:54pt 36pt 54pt 54pt }
			div.Section13 { page:Section13 }
			@page Section14 { size:378pt 576pt; margin:54pt 36pt 54pt 54pt }
			div.Section14 { page:Section14 }
			@page Section15 { size:378pt 576pt; margin:54pt 36pt 54pt 54pt }
			div.Section15 { page:Section15 }
			@page Section16 { size:378pt 576pt; margin:54pt 36pt 54pt 54pt }
			div.Section16 { page:Section16 }
			@page Section17 { size:378pt 576pt; margin:54pt 36pt 54pt 54pt }
			div.Section17 { page:Section17 }
			@page Section18 { size:378pt 576pt; margin:54pt 36pt 54pt 54pt }
			div.Section18 { page:Section18 }
			@page Section19 { size:378pt 576pt; margin:54pt 36pt 54pt 54pt }
			div.Section19 { page:Section19 }
			@page Section20 { size:378pt 576pt; margin:54pt 36pt 54pt 54pt }
			div.Section20 { page:Section20 }
			@page Section21 { size:378pt 576pt; margin:54pt 36pt 54pt 54pt }
			div.Section21 { page:Section21 }
			@page Section22 { size:378pt 576pt; margin:54pt 36pt 54pt 54pt }
			div.Section22 { page:Section22 }
			@page Section23 { size:378pt 576pt; margin:54pt 36pt 54pt 54pt }
			div.Section23 { page:Section23 }
			@page Section24 { size:378pt 576pt; margin:54pt 36pt 54pt 54pt }
			div.Section24 { page:Section24 }
			@page Section25 { size:378pt 576pt; margin:54pt 36pt 54pt 54pt }
			div.Section25 { page:Section25 }
			@page Section26 { size:378pt 576pt; margin:54pt 36pt 54pt 54pt }
			div.Section26 { page:Section26 }
			@page Section27 { size:378pt 576pt; margin:54pt 36pt 54pt 54pt }
			div.Section27 { page:Section27 }
			@page Section28 { size:378pt 576pt; margin:54pt 36pt 54pt 54pt }
			div.Section28 { page:Section28 }
			@page Section29 { size:378pt 576pt; margin:54pt 36pt 54pt 54pt }
			div.Section29 { page:Section29 }
			@page Section30 { size:378pt 576pt; margin:54pt 36pt 54pt 54pt }
			div.Section30 { page:Section30 }
			@page Section31 { size:378pt 576pt; margin:54pt 36pt 54pt 54pt }
			div.Section31 { page:Section31 }
			@page Section32 { size:378pt 576pt; margin:54pt 36pt 54pt 54pt }
			div.Section32 { page:Section32 }
			@page Section33 { size:378pt 576pt; margin:54pt 36pt 54pt 54pt }
			div.Section33 { page:Section33 }
			@page Section34 { size:378pt 576pt; margin:54pt 36pt 54pt 54pt }
			div.Section34 { page:Section34 }
			@page Section35 { size:378pt 576pt; margin:54pt 36pt 54pt 54pt }
			div.Section35 { page:Section35 }
			@page Section36 { size:378pt 576pt; margin:54pt 36pt 54pt 54pt }
			div.Section36 { page:Section36 }
			@page Section37 { size:378pt 576pt; margin:54pt 36pt 54pt 54pt }
			div.Section37 { page:Section37 }
			@page Section38 { size:378pt 576pt; margin:54pt 36pt 54pt 54pt }
			div.Section38 { page:Section38 }
			@page Section39 { size:378pt 576pt; margin:54pt 36pt 54pt 54pt }
			div.Section39 { page:Section39 }
			@page Section40 { size:378pt 576pt; margin:54pt 36pt 54pt 54pt }
			div.Section40 { page:Section40 }

Every other bit of styling is done using inline styles which are also a mess including what appear to be random languages (24 of them in one chapter).
DNSB is offline   Reply With Quote