11-07-2011, 05:44 AM | #1 |
Enthusiast
Posts: 28
Karma: 10
Join Date: May 2010
Location: Stockholm
Device: iPhone, iPad, Nook, Bookeen, Sony Reader
|
Reset CSS in ebooks?
Hi,
Anyone knows or has developed an reset.css for ebooks? If not, wouldn't it be awesome if there was one? /Adam |
11-07-2011, 07:17 AM | #2 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
What do you mean with a reset CSS? If you don't want layout, remove the stylesheet. However, don't complain that it looks terrible.
|
Advert | |
|
11-09-2011, 11:48 PM | #3 |
Zealot
Posts: 107
Karma: 1000
Join Date: Sep 2010
Location: Melbourne, Australia
Device: iPad2, Kindle
|
I assume gardefjord is looking for a css template that works across as many devices as possible, as a starting point for building epubs?
This would be useful and I believe there are a few out there. I haven't looked into it yet, but will when time allows. |
11-10-2011, 02:08 PM | #4 |
I mess around with Epubs
Posts: 82
Karma: 1566
Join Date: Mar 2011
Location: Cambridge, MA
Device: mac, ipad, nook, kindle
|
I know what your talking about, I use a reset.css file for all my web pages. I haven't really seen the need for one in a epub.
|
11-11-2011, 07:21 AM | #5 |
Enthusiast
Posts: 28
Karma: 10
Join Date: May 2010
Location: Stockholm
Device: iPhone, iPad, Nook, Bookeen, Sony Reader
|
Yes SamL, that's exactly what I'm refering too.
And, it feels kind of weird that people on mobileread don't know about it. Guess that it's tricky to try and implement a reset.css in a similar way that you/we do in web design (I think we have a lot more read-engines then web designers has browsers). But, you have to start somewhere... How about here: https://wiki.mobileread.com/wiki/CSS_template |
Advert | |
|
11-11-2011, 08:15 AM | #6 |
Grand Sorcerer
Posts: 27,893
Karma: 198099188
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I'm not grasping why/how it's being labeled a "reset" css? I understand "template" or "starting-point," but "reset" just doesn't make any sense. It seems to imply that you could "reset" the style of an html document with that type of stylesheet—which is, of course, impossible... unless you find a way to strip all the old class attributes from the HTML itself and replace them with the appropriate "reset" values?
Templates are fine. But in order for a global template to work with the widest range of texts/ereaders/browsers/creators possible, it's going to have to be so minimal as to be rather pointless. I know people develop their own css templates, but that's different... they've discovered what works for them. A global ePub CSS template might look something like: Code:
p { line-height: 120%; text-indent: 1.2em; margin-bottom: 0; margin-right: 0; margin-top: 0; margin-left: 0; } |
11-11-2011, 08:32 AM | #7 | |
eBook Enthusiast
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
Quote:
|
|
11-11-2011, 11:04 AM | #8 |
Evangelist
Posts: 416
Karma: 14682
Join Date: May 2008
Location: SF Bay Area
Device: Nook HD, Nook for Windows 8
|
It's a term from web designers - it's called 'reset' because by including it you were 'resetting' the styles that were different between different browsers to a common set of stylings, however it's come to be a basic template that designers then elaborate on.
Google came up with this as a history primer which looks close to right: http://sixrevisions.com/css/the-history-of-css-resets/ I don't know think there's an equivalent for ePub rendering space, because as the OP is starting to realize, nobody's really considered this. Likely because the various renderers (even those using the same rendering engine) vary so widely in what they do, and we (the vendors) haven't published much information about what we are doing. As a for instance if you look at the same EPUB on a Nook Color, a Sony T1, and in ADE 1.8 - you will find all three different renderings: 1.) Unless the font is embedded - the font used will be different (and even then it may be overridden on the NC) 2.) EInk vs Color makes a big difference, that the browser reset CSS authors haven't thought about. 2.) Linespacing,font size, margin and other override settings are available on the T1 and NC, but not in ADE (well font size is). Last edited by Jim Lester; 11-11-2011 at 11:10 AM. |
11-11-2011, 11:21 AM | #9 |
eBook Enthusiast
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
Thanks, Jim; I've been creating eBooks for more years than I care to remember, but that's a new one on me.
|
11-11-2011, 11:43 AM | #10 |
Grand Sorcerer
Posts: 27,893
Karma: 198099188
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
My thanks, as well.
I've always considered myself fairly fluent in web design and its terminology, but that was a term I'd never heard of. |
11-11-2011, 12:00 PM | #11 |
eBook Enthusiast
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
One should perhaps be wary of resetting too many of the "defaults" of a reading device for an eBook. Eg, changing the font size for the body text is a BAD idea; there's nothing more annoying than a book which displays in a font size that's different from what the user expects; the reading device itself will allow the user to make the text larger or small. Don't mess with that!
|
11-20-2011, 05:22 PM | #12 |
Zealot
Posts: 107
Karma: 1000
Join Date: Sep 2010
Location: Melbourne, Australia
Device: iPad2, Kindle
|
You might try this out: wiki.mobileread.com/wiki/CSS_template
|
11-25-2011, 03:52 AM | #13 |
Enthusiast
Posts: 28
Karma: 10
Join Date: May 2010
Location: Stockholm
Device: iPhone, iPad, Nook, Bookeen, Sony Reader
|
@Harry_T & DiapDealer, sorry for not explaining in full what i've meant. But now you know, thanks to Jim!
And I totally agree with him that it's a very difficult task to try and create a reset for all the different devices out there. But you got to start somewhere, don't you? I guess reset.css in webdeisgn came about because of IE, perhaps that samething similar will happen for Mobile Reader SDK, which I (and others) think is developing too slow. @virtual_ink I've allready posted that link |
09-04-2012, 09:34 AM | #14 |
Bemused by possibilities
Posts: 58
Karma: 480244
Join Date: Jul 2012
Device: iPad3, Kobo
|
A css reset is very common in web design, with the most popular one being Meyer's reset which I use in all my web css stylesheets. I also use a reset for ebooks that does not reset the font size.
|
09-11-2012, 08:44 PM | #15 |
Addict
Posts: 239
Karma: 1280000
Join Date: Oct 2010
Location: USA
Device: None
|
Good for reader/stylists
Or whatever you want to call us who want to format their e-books to their own preferences. In this case, the CSS person is also the reader.
It would be nice to have a reset.css equivalent, for exactly the same reason the Yahoo YUI reset became so popular - more consistent presentation across multiple clients and over time - except in this case, from the reader's point of view of reading and keeping their books in their library. |
Tags |
css, ebooks, epub, reset, reset.css |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Override ePub CSS with userStyle.css? | barium | Sony Reader Dev Corner | 11 | 07-16-2011 03:25 PM |
epub CSS versus "Regular" CSS | konrad | ePub | 4 | 02-18-2011 09:29 AM |
css pseudo elements and adjacent combinators in extra css? | ldolse | Calibre | 2 | 12-21-2010 05:09 PM |
PRS-300 Have to reset often | dura | Sony Reader | 0 | 07-07-2010 04:14 AM |
Reset button not working and ebooks being corrupted. | cipicip | Bookeen | 15 | 03-27-2008 02:32 PM |