![]() |
#16 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,792
Karma: 146391129
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
And to get back on topic, I do think a stylesheet should be part of the ePub and every class should have a style as well as there being a body style. The problem being that you cannot rely on the defaults. What's the default for ADE might not be the default for iBooks or some other ePub reader. The only way to make sure the ePub looks the same in different programs is to have a stylesheet with all classes defined. |
|
![]() |
![]() |
![]() |
#17 | |
The Grand Mouse 高貴的老鼠
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 73,995
Karma: 315160596
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Oasis
|
Quote:
However, you should not then try to enforce any rendering by use of in-line HTML style commands. If you're going to do any formatting, you should do it in CSS for consistency. That is, it's much better to have CSS of p { text-indent: 1em; } p.first { text-indent: 0em; } and HTML of <p class="first">First paragraph in my chapter</p> <p>Next paragraph</p> <p>Another paragraph<p> rather than just HTML of <p style="text-indent: 1em">First paragraph in my chapter</p> <p style="text-indent: 0em">Next paragraph</p> <p style="text-indent: 0em">Another paragraph<p> |
|
![]() |
![]() |
Advert | |
|
![]() |
#18 | ||
The Grand Mouse 高貴的老鼠
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 73,995
Karma: 315160596
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Oasis
|
Quote:
Quote:
|
||
![]() |
![]() |
![]() |
#19 | ||
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,792
Karma: 146391129
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
Quote:
<p class="noindent"> is meaningless if noindent is not defined. Last edited by pdurrant; 12-21-2015 at 01:51 PM. Reason: fixed quote tag |
||
![]() |
![]() |
![]() |
#20 |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,355
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
The UTTER minimum is to not have one at all. It's not required. BUT your books would look....ummmm.... horrendous. Unless you decided to totally go against best practice and put any/all styling inline (in your html)...
![]() You can have a really good, really compact, minimalist css file that really makes your book look good. It just takes practice/experience. I would highly recommend NOT ignoring the possibilities of css in your ePub reinvention journey. edit: ooops...didn't see page 2 lol. What they said... Last edited by Turtle91; 12-21-2015 at 08:03 AM. |
![]() |
![]() |
Advert | |
|
![]() |
#21 |
The Grand Mouse 高貴的老鼠
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 73,995
Karma: 315160596
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Oasis
|
|
![]() |
![]() |
![]() |
#22 |
Karmaniac
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,553
Karma: 11499146
Join Date: Oct 2008
Location: Miami FL
Device: PRS-505, Jetbook, + Mini, +Color, Astak Ez Reader Pro, PPW1, Aura H2O
|
By not putting anything at all, the ebook reader will aplly font type, size, line spacing, and margins.
So it's not like it's super ugly. A lot of books that are formatted in a certain way, only look good that way, that the publisher intended. As soon as the reader overrides the font sizes and margins, it'll look different, as many people may not be comfortable with the font sizes chosen anyway. So the first letter of a paragraph doesn't look big without a css. What else changes? |
![]() |
![]() |
![]() |
#23 | |
Unicycle Daredevil
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,944
Karma: 185432100
Join Date: Jan 2011
Location: Planet of the Pudding Brains
Device: Aura HD (R.I.P. After six years the USB socket died.) tolino shine 3
|
Quote:
Unindented paragraphs. Titles too large, always bold, with too small a top-margin. Ugly for prose, a total mess for poetry. That's more than enough ugliness for me, but perhaps not for you. You'll have to test that for yourself. But whenever I come across a book like that, I am a bit miffed. |
|
![]() |
![]() |
![]() |
#24 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,792
Karma: 146391129
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
So I see no reason to put p in as long as you only use it with p. In fact, I see no reason to limit any class. Sometimes I find the need for something that if I had limited it would mean having to add in another class when I already had one that worked.
|
![]() |
![]() |
![]() |
#25 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,792
Karma: 146391129
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
As for your lot of books, I disagree. I've changed some of the formatting of many eBooks and they look even better when I am done. The thing with eBooks is it's OK to change things so you are able to comfortably read. |
|
![]() |
![]() |
![]() |
#26 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,792
Karma: 146391129
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
![]() |
![]() |
![]() |
#27 | |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,355
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Quote:
Not all of them do. I would even go so far as to say that most do not. Although yours might, it is by far the wiser course to provide a default style. Then, if the user wishes, and their device/app allows, they can change your defaults to suit. The above discussion about the merits of specifying the element, or not, aside, you would have chosen...unwisely... if you decide to disregard css altogether. Anyone, or any computer, can put <p> tags around every paragraph, but "styling" the book (with css) is what makes it enjoyable to read - or at least makes it so people aren't distracted by the bad formatting to the extent that they cannot enjoy the story. Can you imagine trying to read a book like this: Spoiler:
or this: Spoiler:
I've seen much worse - and it usually comes from authors who try and use some automated process to create their epub, not using css, or not using it correctly. |
|
![]() |
![]() |
![]() |
#28 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,792
Karma: 146391129
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
The first attached image shows the eBook with the CSS and the second image shows how bad it looks without CSS.
There is formatting that gets lost without CSS. |
![]() |
![]() |
![]() |
#29 |
Karmaniac
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,553
Karma: 11499146
Join Date: Oct 2008
Location: Miami FL
Device: PRS-505, Jetbook, + Mini, +Color, Astak Ez Reader Pro, PPW1, Aura H2O
|
The only devices I really looked at making ebooks on, where the Kindle Paperwhite, Kobo H2O, Sony PRS-505, and Jetbook Color.
All of them allow some basic change of fonts, sizes, line spacing, and in some cases margin sizes, and paragraph spacing. In case of JSWolf's last example, is a good reason to use CSS, using multi font types in one document, ... But many books only use one font. Especially older books (those in public domain), with only variations either bold or italic text, which can easily be done in HTML. line indent, I wonder... It's way easier to use a space in the HTML document, or worst case, use ' ' before each line that needs indenting. So it is possible in HTML, but for longer texts, it might indeed be better to use it in the CSS. For encyclopedias, dictionaries, and bibles, line indenting actually is better written in HTML, since it's not using long paragraphs, but multiple very short ones. Encoding multiple smaller paragraphs to use CSS might end up making your document a lot larger, than just using a space, or ' ' before each line. is supposed to be a non-breaking space, but the fact that the ' ' always comes after a \r\n (enter), means it'll never be broken up, unless in the highly unlikely event that the first word is larger than your display width, or font sizes are large (eg: 24pt or more). Last edited by ProDigit; 12-21-2015 at 07:25 PM. |
![]() |
![]() |
![]() |
#30 | |
The Grand Mouse 高貴的老鼠
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 73,995
Karma: 315160596
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Oasis
|
Quote:
CSS is intended to separate the appearance of the text from the structure of the text, making it much easier to consistently format the text for display, and to adjust that format. You really should be using it if you're making ePubs. |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Converting cm to em in css stylesheet | roger64 | ePub | 41 | 06-13-2014 01:00 PM |
Question: Find/Replace in css stylesheet | ElMiko | Sigil | 12 | 12-25-2011 06:29 AM |
ePub margins : @page vs stylesheet.css | Agama | Calibre | 1 | 08-16-2010 04:37 PM |
How to maintain a global CSS stylesheet | amoroso | Sigil | 7 | 07-18-2010 08:37 PM |
Where is the stylesheet.css? | roger64 | Sigil | 4 | 03-23-2010 02:12 PM |