SlideShare a Scribd company logo
1 of 31
Download to read offline
Responsive Ebook Design
Sanders Kleinfeld
Twitter: @sandersk
Medium: https://medium.com/@sandersk
What do we mean by
responsive design?
“Rather than tailoring disconnected designs to
each of an ever-increasing number of web
devices, we can treat them as facets of the
same experience. We can design for an
optimal viewing experience, but embed
standards-based technologies into our designs
to make them not only more flexible, but more
adaptive to the media that renders them.”
!
— Ethan Marcotte
“Responsive Web Design”
http://alistapart.com/article/responsive-web-design
Responsive Ebook Design:
Four Principles
1. Content is split into pages
(Safari for Mac) (iBooks for Mac)
2. Content reflows from page to page
(iBooks for iPhone) (iBooks for iPad)
3. Content settings are user-configurable
User #1’s settings User #2’s settings
4. Single ebook archive for all platforms
(iBooks) (NOOK)
(Google Play)
(Kobo) (Kindle)*
(Universal Ebook)
* Either converted to MOBI via KindleGen, or submitted to Amazon for conversion
Responsive Ebook Design
Toolbox:
CSS Media Queries
Media Queries encapsulate CSS rules to
be applied only when certain display
conditions are satisfied, such as:
!
!
• Screen dimensions fall within a given
width/height range
!
• Screen is monochrome or color
!
• Screen orientation is portrait or
landscape
Media Query Syntax*
!
!
!
!
@media media-type and (media-feature)
{!
/* CSS Rules to be applied */!
}
* Media queries may contain an optional media type, followed by zero
or more media features in parentheses delimited by “and”.
Some Key W3C-Specified
Media Types:
!
!
• all - applied on any device
!
• print - applied to output for printers
!
• speech - applied on screen readers
!
• screen - applied to any display that is
not print or speech, which encompasses
most Web browsers and readers
Kindle’s Custom Media Types*:
!
!
• amzn-kf8 - applied on any Kindle device
or app that supports Amazon’s Kindle
Format 8 specification
!
• amzn-mobi - applied to Kindle devices or
apps that support only the legacy MOBI
7 format.
* See Chapter 8 of Kindle Publisher Guidelines
Example #1:
Kindle’s Recommended Media
Queries for table handling*
!
@media amzn-mobi {
table.complex {
/* Suppress display of complex tables on MOBI and use
fallback image instead */
display: none;
}
}
!
@media amzn-kf8 {
img.table_fallback {
/* Suppress display of table fallback images on KF8,
which can support complex tables */
display: none;
}
}
* See Chapter 8 of Kindle Publisher Guidelines
Some Key W3C-Specified
Media Features:
!
!
• (min-|max-)width - query the width of the current display window.
!
• (min-|max-)device-width* - query the screen width of the device
!
• (min-|max-)height - query the height of the current display window
!
• (min-|max-)device-height* - query the screen height of the device
!
• orientation - query whether orientation is currently portrait or
landscape
!
• color - query whether the display is color
!
• monochrome - query whether the display is monochrome
* Deprecated in Media Queries Level 4
Example #2:
Media Query for iBooks for iPad
!
!
@media (min-device-width:768px) !
and (max-device-width:1024px) {!
#usernote::before {!
content: “You are reading this on
iBooks for iPad";!
}!
}
iBooks Ereader Detector
https://github.com/sandersk/ibooks_ereader_detector
Example #3:
Media query to target both
iBooks + KF8-enabled Kindle*
!
!
@media not amzn-mobi {
/* Styling for everything that _is not_
a MOBI 7 platform */
}
* See Liz Castro’s “Media Queries for formatting Poetry on Kindle
and EPUB” for real-world applications.
Responsive Ebook Design
Toolbox:
CSS Fragmentation
Some Key W3C-Specified
Fragmentation Properties:*
!
• page-break-before - configure page
breaking rules before specified element(s)
!
• page-break-after - configure page
breaking rules after specified element(s)
!
• page-break-inside - configure page
breaking rules within specified element(s)
* CSS Fragmentation Module Level 3 no longer mandates “page-” prefix on these
properties, but it’s a good idea to keep them for broad ereader compatibility
page-break- properties accept the
following values
• auto - Defer to browser/ereader on
pagebreak here (default)
• avoid - Avoid pagebreak here
• always - Always pagebreak here
• left - Add one or two pagebreaks to
make next page a left page
• right - Add one or two pagebreaks to
make next page a right page
• inherit - Inherit pagebreak rules from
parent element*
* “page-break” rules are not inherited by default
Example #1:
Force pagebreaks before top-level
headings
!
!
h1 { page-break-before: always }
Example #2:
Avoid pagebreaks within figures
!
!
figure { page-break-inside: avoid }
Some More Key W3C-Specified
Fragmentation Properties:*
!
• orphans - specify minimum number of
lines within an element that must be
preserved before a page boundary (at
bottom of page)
!
• widows - specify minimum number of
lines within an element that must be
preserved after a page boundary (at top
of page)
* Default value is 2 for both properties
Example #3:
Require three paragraph lines to
“stay together” at both the
bottom and top of pages
p { !
orphans: 3!
widows: 3 !
}
Responsive Ebook Design:
The Next Generation*
* Minimal or nonexistent ereader support as of February 2015
Media Queries Level 4:
New Media Features
!
!
• overflow-block - query whether display content is
paginated (paged) or scrolling (scroll).
!
• light-level - query for amount of ambient lighting:
low (dim), appropriate (normal), or high (washed)
!
• update-frequency - query for screen refresh rate:
slow or normal
!
• inverted-colors - query whether screen colors are
inverted (e.g., night view on many ereaders)
EPUB Multiple Renditions:
Include multiple sets of content assets in
one EPUB archive via rendition: attributes
!
• rendition:accessMode - Associate set of assets with method
of communication: auditory, tactile, textual, or visual
!
• rendition:language - Associate set of assets with specific
language. Takes ISO 639 language code (e.g., “en” for English,
“fr” for French)
!
• rendition:layout - Associate set of assets with layout
paradigm: reflowable or pre-paginated (fixed layout)
!
• rendition:media - Associate set of assets with valid media-
query media feature.
Example:
A container.xml file for an EPUB 3
with three renditions
<container version="1.0"
xmlns="urn:oasis:names:tc:opendocument:xmlns:container"
xmlns:rendition="http://www.idpf.org/2013/rendition">
<rootfiles>
<rootfile full-path="OEBPS/default.opf"
media-type="application/oebps-package+xml"/>
<rootfile full-path="OEBPS/monochrome-reflow.opf"
media-type="application/oebps-package+xml"
rendition:media="monochrome"/>
<rootfile full-path="OEBPS/ipad-reflowable.opf"
media-type="application/oebps-package+xml"
rendition:layout="reflowable"
rendition:media="min-device-width:768px"/>
</rootfiles>
</container>
EPUB Adaptive Layout:
Marrying the sophistication of fixed layout
with the principles of responsive design
“Apollo 8" Adaptive Layout EPUB demo by Peter Sorotokin, rendered in Mobile Safari for iPad 3 (left)
and iPhone 5S (right). Tutorial and samples available at http://sorotokin.com/adaptive-layout/.
Thank You!
!
For more, read my
article “Responsive
Ebook Design: A
Primer”

More Related Content

Recently uploaded

原版1:1定制堪培拉大学毕业证(UC毕业证)#文凭成绩单#真实留信学历认证永久存档
原版1:1定制堪培拉大学毕业证(UC毕业证)#文凭成绩单#真实留信学历认证永久存档原版1:1定制堪培拉大学毕业证(UC毕业证)#文凭成绩单#真实留信学历认证永久存档
原版1:1定制堪培拉大学毕业证(UC毕业证)#文凭成绩单#真实留信学历认证永久存档208367051
 
Design principles on typography in design
Design principles on typography in designDesign principles on typography in design
Design principles on typography in designnooreen17
 
Call Girls Meghani Nagar 7397865700 Independent Call Girls
Call Girls Meghani Nagar 7397865700  Independent Call GirlsCall Girls Meghani Nagar 7397865700  Independent Call Girls
Call Girls Meghani Nagar 7397865700 Independent Call Girlsssuser7cb4ff
 
Top 10 Modern Web Design Trends for 2025
Top 10 Modern Web Design Trends for 2025Top 10 Modern Web Design Trends for 2025
Top 10 Modern Web Design Trends for 2025Rndexperts
 
DAKSHIN BIHAR GRAMIN BANK: REDEFINING THE DIGITAL BANKING EXPERIENCE WITH A U...
DAKSHIN BIHAR GRAMIN BANK: REDEFINING THE DIGITAL BANKING EXPERIENCE WITH A U...DAKSHIN BIHAR GRAMIN BANK: REDEFINING THE DIGITAL BANKING EXPERIENCE WITH A U...
DAKSHIN BIHAR GRAMIN BANK: REDEFINING THE DIGITAL BANKING EXPERIENCE WITH A U...Rishabh Aryan
 
cda.pptx critical discourse analysis ppt
cda.pptx critical discourse analysis pptcda.pptx critical discourse analysis ppt
cda.pptx critical discourse analysis pptMaryamAfzal41
 
办理(宾州州立毕业证书)美国宾夕法尼亚州立大学毕业证成绩单原版一比一
办理(宾州州立毕业证书)美国宾夕法尼亚州立大学毕业证成绩单原版一比一办理(宾州州立毕业证书)美国宾夕法尼亚州立大学毕业证成绩单原版一比一
办理(宾州州立毕业证书)美国宾夕法尼亚州立大学毕业证成绩单原版一比一F La
 
PORTFOLIO DE ARQUITECTURA CRISTOBAL HERAUD 2024
PORTFOLIO DE ARQUITECTURA CRISTOBAL HERAUD 2024PORTFOLIO DE ARQUITECTURA CRISTOBAL HERAUD 2024
PORTFOLIO DE ARQUITECTURA CRISTOBAL HERAUD 2024CristobalHeraud
 
毕业文凭制作#回国入职#diploma#degree澳洲弗林德斯大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲弗林德斯大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree 毕业文凭制作#回国入职#diploma#degree澳洲弗林德斯大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲弗林德斯大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree ttt fff
 
306MTAMount UCLA University Bachelor's Diploma in Social Media
306MTAMount UCLA University Bachelor's Diploma in Social Media306MTAMount UCLA University Bachelor's Diploma in Social Media
306MTAMount UCLA University Bachelor's Diploma in Social MediaD SSS
 
PORTAFOLIO 2024_ ANASTASIYA KUDINOVA
PORTAFOLIO   2024_  ANASTASIYA  KUDINOVAPORTAFOLIO   2024_  ANASTASIYA  KUDINOVA
PORTAFOLIO 2024_ ANASTASIYA KUDINOVAAnastasiya Kudinova
 
MT. Marseille an Archipelago. Strategies for Integrating Residential Communit...
MT. Marseille an Archipelago. Strategies for Integrating Residential Communit...MT. Marseille an Archipelago. Strategies for Integrating Residential Communit...
MT. Marseille an Archipelago. Strategies for Integrating Residential Communit...katerynaivanenko1
 
原版美国亚利桑那州立大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
原版美国亚利桑那州立大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree原版美国亚利桑那州立大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
原版美国亚利桑那州立大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degreeyuu sss
 
Call Girls Aslali 7397865700 Ridhima Hire Me Full Night
Call Girls Aslali 7397865700 Ridhima Hire Me Full NightCall Girls Aslali 7397865700 Ridhima Hire Me Full Night
Call Girls Aslali 7397865700 Ridhima Hire Me Full Nightssuser7cb4ff
 
Design and Managing Service in the field of tourism and hospitality industry
Design and Managing Service in the field of tourism and hospitality industryDesign and Managing Service in the field of tourism and hospitality industry
Design and Managing Service in the field of tourism and hospitality industryrioverosanniejoy
 
Pharmaceutical Packaging for the elderly.pdf
Pharmaceutical Packaging for the elderly.pdfPharmaceutical Packaging for the elderly.pdf
Pharmaceutical Packaging for the elderly.pdfAayushChavan5
 
1比1办理美国北卡罗莱纳州立大学毕业证成绩单pdf电子版制作修改
1比1办理美国北卡罗莱纳州立大学毕业证成绩单pdf电子版制作修改1比1办理美国北卡罗莱纳州立大学毕业证成绩单pdf电子版制作修改
1比1办理美国北卡罗莱纳州立大学毕业证成绩单pdf电子版制作修改yuu sss
 
FiveHypotheses_UIDMasterclass_18April2024.pdf
FiveHypotheses_UIDMasterclass_18April2024.pdfFiveHypotheses_UIDMasterclass_18April2024.pdf
FiveHypotheses_UIDMasterclass_18April2024.pdfShivakumar Viswanathan
 
办理卡尔顿大学毕业证成绩单|购买加拿大文凭证书
办理卡尔顿大学毕业证成绩单|购买加拿大文凭证书办理卡尔顿大学毕业证成绩单|购买加拿大文凭证书
办理卡尔顿大学毕业证成绩单|购买加拿大文凭证书zdzoqco
 
How to Empower the future of UX Design with Gen AI
How to Empower the future of UX Design with Gen AIHow to Empower the future of UX Design with Gen AI
How to Empower the future of UX Design with Gen AIyuj
 

Recently uploaded (20)

原版1:1定制堪培拉大学毕业证(UC毕业证)#文凭成绩单#真实留信学历认证永久存档
原版1:1定制堪培拉大学毕业证(UC毕业证)#文凭成绩单#真实留信学历认证永久存档原版1:1定制堪培拉大学毕业证(UC毕业证)#文凭成绩单#真实留信学历认证永久存档
原版1:1定制堪培拉大学毕业证(UC毕业证)#文凭成绩单#真实留信学历认证永久存档
 
Design principles on typography in design
Design principles on typography in designDesign principles on typography in design
Design principles on typography in design
 
Call Girls Meghani Nagar 7397865700 Independent Call Girls
Call Girls Meghani Nagar 7397865700  Independent Call GirlsCall Girls Meghani Nagar 7397865700  Independent Call Girls
Call Girls Meghani Nagar 7397865700 Independent Call Girls
 
Top 10 Modern Web Design Trends for 2025
Top 10 Modern Web Design Trends for 2025Top 10 Modern Web Design Trends for 2025
Top 10 Modern Web Design Trends for 2025
 
DAKSHIN BIHAR GRAMIN BANK: REDEFINING THE DIGITAL BANKING EXPERIENCE WITH A U...
DAKSHIN BIHAR GRAMIN BANK: REDEFINING THE DIGITAL BANKING EXPERIENCE WITH A U...DAKSHIN BIHAR GRAMIN BANK: REDEFINING THE DIGITAL BANKING EXPERIENCE WITH A U...
DAKSHIN BIHAR GRAMIN BANK: REDEFINING THE DIGITAL BANKING EXPERIENCE WITH A U...
 
cda.pptx critical discourse analysis ppt
cda.pptx critical discourse analysis pptcda.pptx critical discourse analysis ppt
cda.pptx critical discourse analysis ppt
 
办理(宾州州立毕业证书)美国宾夕法尼亚州立大学毕业证成绩单原版一比一
办理(宾州州立毕业证书)美国宾夕法尼亚州立大学毕业证成绩单原版一比一办理(宾州州立毕业证书)美国宾夕法尼亚州立大学毕业证成绩单原版一比一
办理(宾州州立毕业证书)美国宾夕法尼亚州立大学毕业证成绩单原版一比一
 
PORTFOLIO DE ARQUITECTURA CRISTOBAL HERAUD 2024
PORTFOLIO DE ARQUITECTURA CRISTOBAL HERAUD 2024PORTFOLIO DE ARQUITECTURA CRISTOBAL HERAUD 2024
PORTFOLIO DE ARQUITECTURA CRISTOBAL HERAUD 2024
 
毕业文凭制作#回国入职#diploma#degree澳洲弗林德斯大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲弗林德斯大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree 毕业文凭制作#回国入职#diploma#degree澳洲弗林德斯大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲弗林德斯大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
 
306MTAMount UCLA University Bachelor's Diploma in Social Media
306MTAMount UCLA University Bachelor's Diploma in Social Media306MTAMount UCLA University Bachelor's Diploma in Social Media
306MTAMount UCLA University Bachelor's Diploma in Social Media
 
PORTAFOLIO 2024_ ANASTASIYA KUDINOVA
PORTAFOLIO   2024_  ANASTASIYA  KUDINOVAPORTAFOLIO   2024_  ANASTASIYA  KUDINOVA
PORTAFOLIO 2024_ ANASTASIYA KUDINOVA
 
MT. Marseille an Archipelago. Strategies for Integrating Residential Communit...
MT. Marseille an Archipelago. Strategies for Integrating Residential Communit...MT. Marseille an Archipelago. Strategies for Integrating Residential Communit...
MT. Marseille an Archipelago. Strategies for Integrating Residential Communit...
 
原版美国亚利桑那州立大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
原版美国亚利桑那州立大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree原版美国亚利桑那州立大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
原版美国亚利桑那州立大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
 
Call Girls Aslali 7397865700 Ridhima Hire Me Full Night
Call Girls Aslali 7397865700 Ridhima Hire Me Full NightCall Girls Aslali 7397865700 Ridhima Hire Me Full Night
Call Girls Aslali 7397865700 Ridhima Hire Me Full Night
 
Design and Managing Service in the field of tourism and hospitality industry
Design and Managing Service in the field of tourism and hospitality industryDesign and Managing Service in the field of tourism and hospitality industry
Design and Managing Service in the field of tourism and hospitality industry
 
Pharmaceutical Packaging for the elderly.pdf
Pharmaceutical Packaging for the elderly.pdfPharmaceutical Packaging for the elderly.pdf
Pharmaceutical Packaging for the elderly.pdf
 
1比1办理美国北卡罗莱纳州立大学毕业证成绩单pdf电子版制作修改
1比1办理美国北卡罗莱纳州立大学毕业证成绩单pdf电子版制作修改1比1办理美国北卡罗莱纳州立大学毕业证成绩单pdf电子版制作修改
1比1办理美国北卡罗莱纳州立大学毕业证成绩单pdf电子版制作修改
 
FiveHypotheses_UIDMasterclass_18April2024.pdf
FiveHypotheses_UIDMasterclass_18April2024.pdfFiveHypotheses_UIDMasterclass_18April2024.pdf
FiveHypotheses_UIDMasterclass_18April2024.pdf
 
办理卡尔顿大学毕业证成绩单|购买加拿大文凭证书
办理卡尔顿大学毕业证成绩单|购买加拿大文凭证书办理卡尔顿大学毕业证成绩单|购买加拿大文凭证书
办理卡尔顿大学毕业证成绩单|购买加拿大文凭证书
 
How to Empower the future of UX Design with Gen AI
How to Empower the future of UX Design with Gen AIHow to Empower the future of UX Design with Gen AI
How to Empower the future of UX Design with Gen AI
 

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Responsive Ebook Design

  • 1. Responsive Ebook Design Sanders Kleinfeld Twitter: @sandersk Medium: https://medium.com/@sandersk
  • 2. What do we mean by responsive design?
  • 3. “Rather than tailoring disconnected designs to each of an ever-increasing number of web devices, we can treat them as facets of the same experience. We can design for an optimal viewing experience, but embed standards-based technologies into our designs to make them not only more flexible, but more adaptive to the media that renders them.” ! — Ethan Marcotte “Responsive Web Design” http://alistapart.com/article/responsive-web-design
  • 5. 1. Content is split into pages (Safari for Mac) (iBooks for Mac)
  • 6. 2. Content reflows from page to page (iBooks for iPhone) (iBooks for iPad)
  • 7. 3. Content settings are user-configurable User #1’s settings User #2’s settings
  • 8. 4. Single ebook archive for all platforms (iBooks) (NOOK) (Google Play) (Kobo) (Kindle)* (Universal Ebook) * Either converted to MOBI via KindleGen, or submitted to Amazon for conversion
  • 10. Media Queries encapsulate CSS rules to be applied only when certain display conditions are satisfied, such as: ! ! • Screen dimensions fall within a given width/height range ! • Screen is monochrome or color ! • Screen orientation is portrait or landscape
  • 11. Media Query Syntax* ! ! ! ! @media media-type and (media-feature) {! /* CSS Rules to be applied */! } * Media queries may contain an optional media type, followed by zero or more media features in parentheses delimited by “and”.
  • 12. Some Key W3C-Specified Media Types: ! ! • all - applied on any device ! • print - applied to output for printers ! • speech - applied on screen readers ! • screen - applied to any display that is not print or speech, which encompasses most Web browsers and readers
  • 13. Kindle’s Custom Media Types*: ! ! • amzn-kf8 - applied on any Kindle device or app that supports Amazon’s Kindle Format 8 specification ! • amzn-mobi - applied to Kindle devices or apps that support only the legacy MOBI 7 format. * See Chapter 8 of Kindle Publisher Guidelines
  • 14. Example #1: Kindle’s Recommended Media Queries for table handling* ! @media amzn-mobi { table.complex { /* Suppress display of complex tables on MOBI and use fallback image instead */ display: none; } } ! @media amzn-kf8 { img.table_fallback { /* Suppress display of table fallback images on KF8, which can support complex tables */ display: none; } } * See Chapter 8 of Kindle Publisher Guidelines
  • 15. Some Key W3C-Specified Media Features: ! ! • (min-|max-)width - query the width of the current display window. ! • (min-|max-)device-width* - query the screen width of the device ! • (min-|max-)height - query the height of the current display window ! • (min-|max-)device-height* - query the screen height of the device ! • orientation - query whether orientation is currently portrait or landscape ! • color - query whether the display is color ! • monochrome - query whether the display is monochrome * Deprecated in Media Queries Level 4
  • 16. Example #2: Media Query for iBooks for iPad ! ! @media (min-device-width:768px) ! and (max-device-width:1024px) {! #usernote::before {! content: “You are reading this on iBooks for iPad";! }! }
  • 18. Example #3: Media query to target both iBooks + KF8-enabled Kindle* ! ! @media not amzn-mobi { /* Styling for everything that _is not_ a MOBI 7 platform */ } * See Liz Castro’s “Media Queries for formatting Poetry on Kindle and EPUB” for real-world applications.
  • 20. Some Key W3C-Specified Fragmentation Properties:* ! • page-break-before - configure page breaking rules before specified element(s) ! • page-break-after - configure page breaking rules after specified element(s) ! • page-break-inside - configure page breaking rules within specified element(s) * CSS Fragmentation Module Level 3 no longer mandates “page-” prefix on these properties, but it’s a good idea to keep them for broad ereader compatibility
  • 21. page-break- properties accept the following values • auto - Defer to browser/ereader on pagebreak here (default) • avoid - Avoid pagebreak here • always - Always pagebreak here • left - Add one or two pagebreaks to make next page a left page • right - Add one or two pagebreaks to make next page a right page • inherit - Inherit pagebreak rules from parent element* * “page-break” rules are not inherited by default
  • 22. Example #1: Force pagebreaks before top-level headings ! ! h1 { page-break-before: always }
  • 23. Example #2: Avoid pagebreaks within figures ! ! figure { page-break-inside: avoid }
  • 24. Some More Key W3C-Specified Fragmentation Properties:* ! • orphans - specify minimum number of lines within an element that must be preserved before a page boundary (at bottom of page) ! • widows - specify minimum number of lines within an element that must be preserved after a page boundary (at top of page) * Default value is 2 for both properties
  • 25. Example #3: Require three paragraph lines to “stay together” at both the bottom and top of pages p { ! orphans: 3! widows: 3 ! }
  • 26. Responsive Ebook Design: The Next Generation* * Minimal or nonexistent ereader support as of February 2015
  • 27. Media Queries Level 4: New Media Features ! ! • overflow-block - query whether display content is paginated (paged) or scrolling (scroll). ! • light-level - query for amount of ambient lighting: low (dim), appropriate (normal), or high (washed) ! • update-frequency - query for screen refresh rate: slow or normal ! • inverted-colors - query whether screen colors are inverted (e.g., night view on many ereaders)
  • 28. EPUB Multiple Renditions: Include multiple sets of content assets in one EPUB archive via rendition: attributes ! • rendition:accessMode - Associate set of assets with method of communication: auditory, tactile, textual, or visual ! • rendition:language - Associate set of assets with specific language. Takes ISO 639 language code (e.g., “en” for English, “fr” for French) ! • rendition:layout - Associate set of assets with layout paradigm: reflowable or pre-paginated (fixed layout) ! • rendition:media - Associate set of assets with valid media- query media feature.
  • 29. Example: A container.xml file for an EPUB 3 with three renditions <container version="1.0" xmlns="urn:oasis:names:tc:opendocument:xmlns:container" xmlns:rendition="http://www.idpf.org/2013/rendition"> <rootfiles> <rootfile full-path="OEBPS/default.opf" media-type="application/oebps-package+xml"/> <rootfile full-path="OEBPS/monochrome-reflow.opf" media-type="application/oebps-package+xml" rendition:media="monochrome"/> <rootfile full-path="OEBPS/ipad-reflowable.opf" media-type="application/oebps-package+xml" rendition:layout="reflowable" rendition:media="min-device-width:768px"/> </rootfiles> </container>
  • 30. EPUB Adaptive Layout: Marrying the sophistication of fixed layout with the principles of responsive design “Apollo 8" Adaptive Layout EPUB demo by Peter Sorotokin, rendered in Mobile Safari for iPad 3 (left) and iPhone 5S (right). Tutorial and samples available at http://sorotokin.com/adaptive-layout/.
  • 31. Thank You! ! For more, read my article “Responsive Ebook Design: A Primer”