02-08-2017, 01:44 PM | #1 |
Head of lunatic asylum
Posts: 349
Karma: 77620
Join Date: Jun 2012
Location: UTC +1
Device: Tolino Vision 3HD
|
pagestyle.css extra / integrated in stylesheet.css / or not at all?
This time the title says almost everything, right? I got books which an extra pagestyle.css file. pagestyle.css The CSS looks most time somehow like this Code:
@page { margin: 5px; } I delete such an pagestyle.css (or put it to zero) - I want to see the characters (words) of the book and not a ''nice'' margin. (I think to make pagestyle (5px or even 10 px or more) is also a comercial argument - book got more pages.) If I want pagestyle I can integrate it in the normal stylesheet, or not? Do I need pagestyle for any purpose. I think no pagestyle is the same as pagestyle margin: 0. Do pagestyle anyhow affect the CSS Box-model (margin/border/padding)? Last edited by chaot; 02-08-2017 at 01:47 PM. |
02-08-2017, 02:08 PM | #2 |
Resident Curmudgeon
Posts: 73,894
Karma: 128597114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
I do think you should dump pagestyle.css.an @page is not needed. The problem with @page is that is forces margins when a margin of 0 is best. A margin of0 is best so that when using programs/apps that have margin settings, you get the margins the user wants using the margin settings instead of some fixed margin with the options only being able to add to that.
Last edited by JSWolf; 02-08-2017 at 02:14 PM. |
Advert | |
|
02-08-2017, 02:23 PM | #3 |
Grand Sorcerer
Posts: 6,206
Karma: 16228558
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
@chaot,
The existence of page_styles.css suggests you have an epub created by a calibre conversion. If you don't want it created you should review your calibre conversion settings - specifically the 4 x Margin settings on the Page Setup page. I have all mine set to 'Unchanged' and the extra page_styles.css is not created during conversion. Caveat: If your epub contains embedded fonts then converting it will still create page_styles.css file and all the @font-face css statements will have been moved into it. Last edited by jackie_w; 02-08-2017 at 02:31 PM. |
02-08-2017, 06:09 PM | #4 |
null operator (he/him)
Posts: 20,552
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
|
02-08-2017, 07:21 PM | #5 |
A Hairy Wizard
Posts: 3,093
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
AFAIK the reason for a separate pagestyle.css was that the @page was not handled by certain devices. If that @page was included, it would disregard the entire stylesheet... so people would put it on its own sheet so it would not affect any other style commands.
I'm not sure if this is still an issue, but that's what I understood the reasoning to be... Cheers, |
Advert | |
|
02-09-2017, 02:47 AM | #6 | |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Quote:
Not all readers support margin settings in their software. In fact, I like my reader to honor the stylesheet as much as possible and perhaps only allow changes to the font-size. Then again, that is MY opinion and I fully understand that other people have other opinions and I do not impose that my opinion is superior. |
|
02-09-2017, 05:23 PM | #7 | |
Resident Curmudgeon
Posts: 73,894
Karma: 128597114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
02-10-2017, 01:54 AM | #8 | |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Quote:
Of course there are good and bad books out there, but in general a reading app should honor the stylesheet. Like I said, if there is no margin, the text is too close to the screen edge to read comfortably. |
|
02-10-2017, 04:34 AM | #9 | |
Resident Curmudgeon
Posts: 73,894
Karma: 128597114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
There is one way to please everyone. No DRM and make it so the margins and line-height are set in the body style. Just edit the body style and you are good to go. It's really that simple. But in reality, it'll never be that simple. |
|
02-10-2017, 12:06 PM | #10 |
Head of lunatic asylum
Posts: 349
Karma: 77620
Join Date: Jun 2012
Location: UTC +1
Device: Tolino Vision 3HD
|
|
02-20-2017, 02:55 AM | #11 |
Curmudgeon
Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
|
Specifically, unless they've improved things very recently, Adobe Digital Editions barfs on almost all @ rules except for @font and certain extremely basic @media rules. That means any reader based on RMSDK also fails in the same way, which means that readers are probably more likely to fail on @page rules than handle them correctly.
|
02-20-2017, 03:26 AM | #12 | |
Wizard
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
|
Quote:
|
|
02-20-2017, 05:00 AM | #13 | |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Quote:
|
|
02-20-2017, 11:58 PM | #14 | |
Curmudgeon
Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
|
Quote:
And at last check, @media worked for simple things, like the standard Kindle strings, but broke with more interesting rules like these: Code:
@media not screen { ... } @media screen and (max-device-width:960px) and (orientation:portrait) { ... } @media (-webkit-min-device-pixel-ratio: 2) { ... } Last edited by dgatwood; 02-21-2017 at 12:01 AM. |
|
02-24-2017, 11:10 PM | #15 | |
A Hairy Wizard
Posts: 3,093
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Quote:
Is it wrong to put it on a separate sheet?? No. Is it necessary?? Maybe, maybe not. Are you willing to take a chance by putting it on the same sheet?? I am, because I know my reader of choice doesn't barf on it and I only code for my personal use. Cheers, |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
A proposal: help sorting css stylesheet | roger64 | Editor | 47 | 09-08-2016 10:23 PM |
stylesheet.CSS anyone? | ProDigit | ePub | 81 | 12-26-2015 01:43 PM |
Converting cm to em in css stylesheet | roger64 | ePub | 41 | 06-13-2014 01:00 PM |
css pseudo elements and adjacent combinators in extra css? | ldolse | Calibre | 2 | 12-21-2010 05:09 PM |
Where is the stylesheet.css? | roger64 | Sigil | 4 | 03-23-2010 02:12 PM |