Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 05-30-2013, 02:31 PM   #16
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 36,118
Karma: 17161828
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Sony Reader PRS-650, iPad, nook STR
Quote:
Originally Posted by Turtle91 View Post
I agree you can't quite do what you want. The only thing you could do is set your :first-line attribute and then have a minimum number of words (in this example 4) that would be emphasized regardless of the reader's support of the pseudo selector. If the font was so large - or the screen so small - that only 3 words fit on the first line, the 4th word would still be emphasized on the second line. But that would be a pretty extreme situation to only fit 3 words on a line.

eg.
CSS
h1 + p {text-indent:0}
h1 + p:firstline {font-style:italic}
em {font-style:italic}

HTML
<h1>Heading Line</h1>
<p><em>The first four words</em> are italic on non-supportive devices. The entire first line is italic on supportive devices.</p>

-OR-

h1 + p {text-indent:0}
h1 + p:firstline {font-variant:small-caps}
.smcap {font-variant:small-caps}

<h1>Heading Line</h1>
<p><span class="smcap">The first four words</span> are smallcaps on non-supportive devices. The entire first line is smallcaps on supportive devices.</p>
Incorrect! The first four words are not smallcaps as ADE does not support smallcaps as a font variant. So it won't work. All you'll is the first paragraph with ALL the words in the same format.
JSWolf is offline   Reply With Quote
Old 05-30-2013, 02:57 PM   #17
Turtle91
Guru
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 669
Karma: 3807234
Join Date: Dec 2012
Location: Shannon, Ireland today
Device: iPhone 5/iPad 1&2/Surface Pro/Kindle PW
Quote:
Originally Posted by JSWolf View Post
Incorrect! The first four words are not smallcaps as ADE does not support smallcaps as a font variant. So it won't work. All you'll is the first paragraph with ALL the words in the same format.
It actually is correct, and works fine on devices that support small caps. (reference Jellby's and my comment a few days ago) ...the "non-supportive" means non-supportive of the :first-line pseudo element - not small caps.

The question wasn't really about small caps support or ADE for that matter. It was how to get the :first-line pseudo element to work with the right number of words. The small caps and italics was just an example of how to change the formatting...of course it depends on if the device fully supports the spec or not. ADE, from what I've experienced, doesn't.
Turtle91 is offline   Reply With Quote
Old 05-30-2013, 03:15 PM   #18
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 8,752
Karma: 39252811
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
ADE IS the spec, silly turtle!
Sorry, got carried away a bit there playing wolf's-advocate.
DiapDealer is offline   Reply With Quote
Reply

Tags
drop cap, epub, first line, small caps

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Book chapters/story line sunny1z Sigil 3 01-21-2013 11:06 PM
epub to epub converting: making chapters? Joy736 Conversion 8 10-30-2011 04:47 PM
azw to mobi: Not detecting chapters/page break at chapters and no TOC RachDvn Calibre 3 01-16-2011 09:53 AM
HTML2EPUB Command Line for splitting chapters stratman Calibre 6 01-22-2010 09:26 AM


All times are GMT -4. The time now is 02:49 PM.


MobileRead.com is a privately owned, operated and funded community.