View Single Post
Old 09-17-2024, 03:33 PM   #21
Turtle91
A Hairy Wizard
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: 3,370
Karma: 20212733
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:
Originally Posted by JSWolf View Post
If you are coding for an eBook for sale, you have to code for such a system as that's what is used on a Kobo for ePub. There's no way you can make sure the eBook is read as KePub and not ePub on a Kobo. So you have to make sure the CSS is considered valid and that the eBook looks good enough.

Jon...the key words are: "you have to make sure the CSS is considered valid"


Do that using fall-back coding....so if it doesn't understand or support a particular css then it will fall back to coding that it does support....that's all part of good/valid coding...


I will put this example up one more time. Please do some research/learning on how css works. (check out 'CSS order of precedence', and 'specificity') While you are at it, check up on @media and @supports.

{color:blue; color:red; color:green}


will show the color as green because it is the last (most recent) item on the list (not counting styling in the header of the html page, or inline styling)


{height:50%; height:75vh}


will use a height of 75% of the viewable height IF THE DEVICE SUPPORTS VH. If it doesn't support VH then it gracefully ignores it (as required by spec) and falls back to the next most recent item on the list and will use a height of 50%.



Thus you CAN have css that uses the advanced ePub3.3 and/or html5 for the devices that support it, while still being readable on an ePub2 device. You absolutely do NOT have to code for ePub2 only just to be compatible.
Turtle91 is offline   Reply With Quote