SlideShare a Scribd company logo
From HTML 5 & CSS 3...
To ePub 3


@cwehrung
ePub ?
ePub ?
definition
EPUB defines a means of representing, packaging and encoding
structured and semantically enhanced Web content
— including HTML5, CSS, SVG, images, and other resources — for
distribution in a single-file format.
JavaScript
                  Behavior




           HTML 5              CSS 3
           Content              Style




                     ePub 3
                     Package


Technologies                            (theory)
HTML

             Result




       CSS
JavaScript
                Behavior




         HTML 5              CSS 3
         Content              Style




                   ePub 3
                   Package


HTML 5
Audio+Video           Interactivity

              Flash
Geolocation           Local Storage
DEVICES SUPPORT
HTML 5         <canvas>   ::geoloc::   <audio>   <video>   MathML


  iBooks         ✓        Sort Of *      ✓         ✓        ✓
NOOK Color/
  Tablet         ✘           ✘           ✓         ✓        ✘
Safari Books
   Online        ✓           ✓           ✓         ✓        ✓
Kindle Apps      ✘           ✘           ✓         ✓        ✘
 Kindle Fire     ✘           ✘           ✘         ✘        ✘
JavaScript
               Behavior




        HTML 5              CSS 3
        Content              Style




                  ePub 3
                  Package


CSS 3                                (theory)
Animations              Shadows

             Support varies
-webkit, -moz, ...        Regions
Media Queries


  HTML 4

  <link rel="stylesheet" type="text/css" media="screen" href="sans-serif.css">
  <link rel="stylesheet" type="text/css" media="print" href="serif.css">


  CSS 3

  @media screen {
    * { font-family: sans-serif }
  }
Media Queries

  HTML 4

  <link rel="stylesheet" media="screen and (color)" href="example.css" />


  CSS 3

  @import url(color.css) screen and (color);


  Other examples:

  @media (orientation: portrait) { … }

  @media (min-width:500px) { … }
Selectors


  You already know:

  a:link      /*   unvisited links */
  a:visited   /*   visited links */
  a:hover     /*   user hovers */
  a:active    /*   active links */

  An example of combining dynamic pseudo-classes:

  a:focus
  a:focus:hover
Selectors

  The ::before and ::after pseudo-elements

  h1:before { content : "> " }

  Structural pseudo-classes

  tr:nth-child(odd) /* represents every odd row of an HTML table */
  tr:nth-child(even) /* represents every even row of an HTML table */

  /* Alternate paragraph colours in CSS */
  p:nth-child(4n+1) { color: navy; }
  p:nth-child(4n+2) { color: green; }
  p:nth-child(4n+3) { color: maroon; }
  p:nth-child(4n+4) { color: purple; }
Selectors

 div > p:first-child

 This selector represents a p element that is the first child of a div element:

 <p> The last P before the note.</p>
 <div class="note">
 <p> The first P inside the note.</p>
 </div>

 but cannot represent the second p in the following fragment:

 <p> The last P before the note.</p>
 <div class="note">
 <h2> Note </h2>
 <p> The first P inside the note.</p>
 </div>
Selectors

 p { color: red; font-size: 12pt }
 p::first-letter { color: green; font-size: 200% }
 p::first-line { color: blue }

 <P>A bird in the hand is worth two in the bush...</P>
Combinators

 Descendant combinator E F (1) — matches an element F that’s a descendant of an
 element E. Note that descendant combinators target all descendants and not just
 direct children.

 ul li {background: red;}

 <ul>
   <li>List Item 1</li>
   <li>List Item 2
     <ol>
       <li>List Item 2-1</li>
       <li>List Item 2-2</li>
     </ol>
   </li>
   <li>List Item 3</li>
 </ul>
Combinators

 Child combinator E > F (2) — matches an element F that’s a child of an element E.
 The difference here is that F must be a direct child of E.

 ul>li {background: red;}

 <ul>
   <li>List Item 1</li>
   <li>List Item 2
     <ol>
       <li>List Item 2-1</li>
       <li>List Item 2-2</li>
     </ol>
   </li>
   <li>List Item 3</li>
 </ul>
Combinators


 Adjacent sibling combinator E + F (2) — matches an element F immediately preceded by
 an element E. Note the word adjacent. Only the first element F after E will be
 targeted.

 h1+p {background: red;}

 <h1>Heading</h1>
 <p>Paragraph 1</p>
 <p>Paragraph 2</p>
 <p>Paragraph 3</p>
Combinators



 General sibling combinator E ~ F (3) — matches an element F preceded by an element
 E. Unlike the above this will match any sibling and not just the first.

 h1+p {background: red;}

 <h1>Heading</h1>
 <p>Paragraph 1</p>
 <p>Paragraph 2</p>
 <p>Paragraph 3</p>
JavaScript
                Behavior




         HTML 5              CSS 3
         Content              Style




                   ePub 3
                   Package


ePub 3
ePUB




mimetype   OEBPS       META-INF




                   Container   ( iBooks )
                                Options
NEW OPPORTUNITIES
NEW OPPORTUNITIES
EPUB 3 FEATURES

 Semantic Inflection
                         Audio+Video    Content Switching


                                                        Speech

                                  &
                                                        Manifest Fallbacks
    NCX


 Embedded Fonts                       SVG        Metadata

                                       Media Overlays
               Triggers+Binding
                                  MathML         DTBook
Guide ⇢ NavigationDocuments
ePub 2               ePub 3
     CSS 3              ✘                    ✓
    HTML 5              ✘                    ✓
     SVG            In XHTML          Direct in Spine
     Fonts         Only built-in        OTF & WOFF
                                          @font-face


 Audio & Video          ✘                    ✓
  JavaScript            ✘           optionally supported
    Multiple
  Stylesheets           ✘                    ✓
 Alternative to
    XHTML           DTBook               HTML 5
Table of Content      NCX          Navigation Documents
ToC
               ePub 2
<?xml	
  version="1.0"	
  encoding="UTF-­‐8"?>
<ncx	
  xmlns="http://www.daisy.org/z3986/2005/
ncx/"	
  version="2005-­‐1"	
  xml:lang="en-­‐US">
<head>
<meta	
  name="dtb:uid"	
  content="p9780316000000"/>
</head>
<docTitle>
<text>Moby-­‐Dick</text>
</docTitle>
<docAuthor>
<text>Herman	
  Melville</text>
</docAuthor>
<navMap>
(...)
<navPoint	
  playOrder="4"	
  id="introduction_001">
<navLabel>
<text>ETYMOLOGY.</text>
</navLabel>
<content	
  src="introduction_001.html"/>
</navPoint>
<navPoint	
  playOrder="5"	
  id="epigraph_001">
<navLabel>
<text>EXTRACTS	
  (Supplied	
  by	
  a	
  Sub-­‐Sub-­‐
Librarian).</text>
</navLabel>
<content	
  src="epigraph_001.html"/>
</navPoint>
ToC
               ePub 3
<html	
  xmlns="http://www.w3.org/1999/xhtml"
xmlns:epub="http://www.idpf.org/2007/ops"
profile="http://www.idpf.org/epub/30/profile/
content/">
<head>
<title>Moby-­‐Dick</title>
</head>
<body>
<nav	
  id="toc"	
  epub:type="toc">
<h1>Contents</h1>
<ol>
<li	
  id="cover">
<a	
  href="cover.html">Cover</a>
</li>
<li	
  id="titlepage">
<a	
  href="titlepage.html">Title	
  Page</a>
</li>
<li	
  id="preface_001">
<a	
  href="preface_001.html">Original	
  
Transcriber&#x2019;s	
  Notes:</a>
</li>
<li	
  id="introduction_001">
<a	
  href="introduction_001.html">ETYMOLOGY.</a>
</li>
<li	
  id="epigraph_001">
<a	
  href="epigraph_001.html">EXTRACTS	
  (Supplied	
  
by	
  a	
  Sub-­‐Sub-­‐Librarian).</a>
</li>
ePUB




                              META-INF
    OEBPS


content.opf
       mimetype   OEBPS


↬ <metadata>
↬ <manifest>
↬ <spine>                 Container   ( iBooks )
                                       Options

↬ <guide>
content.opf
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<package xmlns="http://www.idpf.org/2007/opf" xmlns:dc="http://purl.org/dc/elements/1.1/"
version="2.0" unique-identifier="bookid">
  <metadata>
    <dc:identifier id="bookid">urn:uuid:9782081266766</dc:identifier>
      <dc:title>My Little Paris</dc:title>
        <dc:publisher>Gutenberg Technology</dc:publisher>
          <dc:date >2012-02-07</dc:date>
            <dc:creator xmlns:opf="http://www.idpf.org/2007/opf" opf:file-as="Daly, Liza">Vasak,
Vladimir</dc:creator>
              <dc:language>fr</dc:language>
                <meta name="cover" content="cover-image"/>
  </metadata>
  <manifest>
    <item id="ncxtoc" media-type="application/x-dtbncx+xml" href="toc.ncx" />
    <item id="cover-image" media-type="image/jpeg" href="cover.jpg" />
    <item id="font1" media-type="application/octet-stream" href="fonts/BZLJKT_HelveticaNeue-
Light.ttf" />
    <item id="css1" media-type="text/css" href="1.css" />
    <item id="page1" media-type="application/xhtml+xml" href="1.html" />
  </manifest>
  <spine toc="ncxtoc">
    <itemref idref="page1" linear="yes" />
    <itemref idref="page2" linear="yes" />
    <itemref idref="page3" linear="yes" />
  </spine>
  <guide>
    <reference type="cover" title="Cover" href="1.html"/>
    <reference type="text" title="Cover" href="1.html"/>
  </guide>
</package>
media overlays
↬ text-to-speech ?
media overlays
↬ text-to-speech ?
media overlays
         ↬ Speech

In content.opf :
 <item id="smil-003" href="smil/page1.smil" media-type="application/smil+xml"/>




In page1.xhtml :
 <p>
 <span   id="word1">Once</span>
 <span   id="word2">upon</span>
 <span   id="word3">a</span>
 <span   id="word4">time</span>...
 </p>
<?xml version="1.0" encoding="UTF-8"?>
                                                                         SMIL
<smil xmlns="http://www.w3.org/ns/SMIL" xmlns:epub="http://www.idpf.org/2011/epub"
version="3.0"
  profile="http://www.idpf.org/epub/30/profile/content/">
  <body>

    <par id="id1"> <!-- Once -->
      <text src="../page003.xhtml#word1"/>
      <audio clipBegin="0.562419" clipEnd=".990" src="../audio/
yellow_submarine.m4a"/>
    </par>

    <par id="id2"> <!-- upon -->
      <text src="../page003.xhtml#word2"/>
      <audio clipBegin="0.993" clipEnd="1.345" src="../audio/yellow_submarine.m4a"/>
    </par>

    <par id="id3"> <!-- a -->
      <text src="../page003.xhtml#word3"/>
      <audio clipBegin="1.345" clipEnd="1.442" src="../audio/yellow_submarine.m4a"/>
    </par>

    <par id="id4"> <!-- time -->
      <text src="../page003.xhtml#word4"/>
      <audio clipBegin="1.442" clipEnd="1.873659" src="../audio/
yellow_submarine.m4a"/>
    </par>

  </body>
</smil>
— animation —
JavaScript ?
JavaScript


     HTML 5                CSS 3




              ePub 3


ePub 3                         (theory)
JavaScript
   HTML 5                CSS 3




            ePub 3



Apple                            (new)
JavaScript
   HTML 5                CSS 3




            ePub 3



Apple                            (new)
LAYOUT TYPES
LAYOUT TYPES
LAYOUT TYPES



                ab le...
         ef low
N ot   R
LAYOUT TYPES
LAYOUT TYPES



Predictable !
Reflowable   Fixed-Layout
WHAT ?
ToC
     fixed-layout
<html	
  xmlns="http://www.w3.org/1999/xhtml"
xmlns:epub="http://www.idpf.org/2007/ops"
profile="http://www.idpf.org/epub/30/profile/content/">
<head>




                       ✗
<title>Moby-­‐Dick</title>
</head>
<body>
<nav	
  id="toc"	
  epub:type="toc">
<h1>Contents</h1>
<ol>
<li	
  id="cover">
<a	
  href="cover.html">Cover</a>
</li>
<li	
  id="titlepage">
<a	
  href="titlepage.html">Title	
  Page</a>
</li>
<li	
  id="preface_001">
<a	
  href="preface_001.html">Original	
  Transcriber&#x2019;s	
  
Notes:</a>
</li>
<li	
  id="introduction_001">
<a	
  href="introduction_001.html">ETYMOLOGY.</a>
</li>
               not compulsory
<li	
  id="epigraph_001">
<a	
  href="epigraph_001.html">EXTRACTS	
  (Supplied	
  by	
  a	
  Sub-­‐

            ⇢ links in page
Sub-­‐Librarian).</a>
</li>

(...)
viewport + metadata ?
In META-INF/com.apple.ibooks.display-options.xml

 <?xml	
  version="1.0"	
  encoding="UTF-­‐8"?>
 <display_options>
 <platform	
  name="*">
 <option	
  name="fixed-­‐layout">true</option>
 </platform>
 </display_options>



In any xhtml content

 <meta	
  name="viewport"	
  content="width=512,	
  height=758"></meta>



In any css stylesheet
 body	
  {	
  width:	
  758px;	
  height:	
  512px;	
  }
JavaScript


     HTML 5                CSS 3




              ePub 3


ePub 3                         (theory)
JavaScript


     HTML 5                  CSS 3


              Fixed-Layout




               ePub 3


ePub 3                           (theory)
JavaScript

   HTML 5                  CSS 3

            Fixed-Layout




             ePub 3


Apple                              (new)
Standard   Retina@2x
standard...
standard...
    vs.
Retina
Standard
Retina@2x
i ze !
F ileS
fixed-layout rules

              <guid
                    e>
spread vs. page
             orientatio
                               size ratio
                       n   -lock

resolution   @media & rendition
fixed-layout limits

        Retina                   localStorage
        “touch” margins
-webkit-le
             tter-spaci
                        n   g
                                        sc ree n>
                                  ! full
                                <

More Related Content

What's hot

What's hot (20)

Introduction to HTML5
Introduction to HTML5Introduction to HTML5
Introduction to HTML5
 
How Cascading Style Sheets (CSS) Works
How Cascading Style Sheets (CSS) WorksHow Cascading Style Sheets (CSS) Works
How Cascading Style Sheets (CSS) Works
 
CSS Dasar #3 : Penempatan CSS
CSS Dasar #3 : Penempatan CSSCSS Dasar #3 : Penempatan CSS
CSS Dasar #3 : Penempatan CSS
 
CSS Dasar #1 : Intro
CSS Dasar #1 : IntroCSS Dasar #1 : Intro
CSS Dasar #1 : Intro
 
Introducing Cascading Style Sheets
Introducing Cascading Style SheetsIntroducing Cascading Style Sheets
Introducing Cascading Style Sheets
 
Html / CSS Presentation
Html / CSS PresentationHtml / CSS Presentation
Html / CSS Presentation
 
Html5 tutorial for beginners
Html5 tutorial for beginnersHtml5 tutorial for beginners
Html5 tutorial for beginners
 
BEM it! Introduction to BEM methodology
BEM it! Introduction to BEM methodologyBEM it! Introduction to BEM methodology
BEM it! Introduction to BEM methodology
 
CSS Introduction
CSS IntroductionCSS Introduction
CSS Introduction
 
CSS Basics
CSS BasicsCSS Basics
CSS Basics
 
CSS Dasar #9 : Inheritance
CSS Dasar #9 : InheritanceCSS Dasar #9 : Inheritance
CSS Dasar #9 : Inheritance
 
HTML5: features with examples
HTML5: features with examplesHTML5: features with examples
HTML5: features with examples
 
CSS Dasar #6 : Background
CSS Dasar #6 : BackgroundCSS Dasar #6 : Background
CSS Dasar #6 : Background
 
CSS Dasar #4 : Font Styling
CSS Dasar #4 : Font StylingCSS Dasar #4 : Font Styling
CSS Dasar #4 : Font Styling
 
SASS - CSS with Superpower
SASS - CSS with SuperpowerSASS - CSS with Superpower
SASS - CSS with Superpower
 
Introduction to HTML and CSS
Introduction to HTML and CSSIntroduction to HTML and CSS
Introduction to HTML and CSS
 
CSS Dasar #2 : Anatomy CSS
CSS Dasar #2 : Anatomy CSSCSS Dasar #2 : Anatomy CSS
CSS Dasar #2 : Anatomy CSS
 
HTML and CSS crash course!
HTML and CSS crash course!HTML and CSS crash course!
HTML and CSS crash course!
 
Intro to HTML and CSS basics
Intro to HTML and CSS basicsIntro to HTML and CSS basics
Intro to HTML and CSS basics
 
Introduction to Bootstrap
Introduction to BootstrapIntroduction to Bootstrap
Introduction to Bootstrap
 

Viewers also liked

The NEW Way to Win Friends & Influence People (social media in events)
The NEW Way to Win Friends & Influence People (social media in events)The NEW Way to Win Friends & Influence People (social media in events)
The NEW Way to Win Friends & Influence People (social media in events)
Lara McCulloch-Carter
 
Plasticos Y Polimeros
Plasticos Y PolimerosPlasticos Y Polimeros
Plasticos Y Polimeros
Hero Valrey
 
Introduction to radiation therapy
Introduction to radiation therapyIntroduction to radiation therapy
Introduction to radiation therapy
Rad Tech
 

Viewers also liked (20)

ePUB 3 and Publishing e-books
ePUB 3 and Publishing e-booksePUB 3 and Publishing e-books
ePUB 3 and Publishing e-books
 
Epub ppt
Epub pptEpub ppt
Epub ppt
 
Web 3.0 Intro
Web 3.0 IntroWeb 3.0 Intro
Web 3.0 Intro
 
CISSP Summary V1.1
CISSP Summary V1.1CISSP Summary V1.1
CISSP Summary V1.1
 
Messenger wars 2: How Facebook climbed back to number 1
Messenger wars 2: How Facebook climbed back to number 1Messenger wars 2: How Facebook climbed back to number 1
Messenger wars 2: How Facebook climbed back to number 1
 
Tmj anatomy
Tmj anatomyTmj anatomy
Tmj anatomy
 
Factors affecting learning PSYCHOLOGICAL, PHYSIOLOGICAL / BIOLOGICAL, ENVIRO...
Factors affecting learning PSYCHOLOGICAL,  PHYSIOLOGICAL / BIOLOGICAL, ENVIRO...Factors affecting learning PSYCHOLOGICAL,  PHYSIOLOGICAL / BIOLOGICAL, ENVIRO...
Factors affecting learning PSYCHOLOGICAL, PHYSIOLOGICAL / BIOLOGICAL, ENVIRO...
 
The NEW Way to Win Friends & Influence People (social media in events)
The NEW Way to Win Friends & Influence People (social media in events)The NEW Way to Win Friends & Influence People (social media in events)
The NEW Way to Win Friends & Influence People (social media in events)
 
Adobe Users Group - ePub3 Revolution
Adobe Users Group -  ePub3 RevolutionAdobe Users Group -  ePub3 Revolution
Adobe Users Group - ePub3 Revolution
 
How to Use LinkedIn Company Pages & Groups
How to Use LinkedIn Company Pages & GroupsHow to Use LinkedIn Company Pages & Groups
How to Use LinkedIn Company Pages & Groups
 
Travel: Changing Course (April 2013)
Travel: Changing Course (April 2013)Travel: Changing Course (April 2013)
Travel: Changing Course (April 2013)
 
Gastroenteritis ppt
Gastroenteritis pptGastroenteritis ppt
Gastroenteritis ppt
 
The New American Dream: Why People Are Choosing to Rent
The New American Dream: Why People Are Choosing to RentThe New American Dream: Why People Are Choosing to Rent
The New American Dream: Why People Are Choosing to Rent
 
Plasticos Y Polimeros
Plasticos Y PolimerosPlasticos Y Polimeros
Plasticos Y Polimeros
 
Banking System Presentation
Banking  System  PresentationBanking  System  Presentation
Banking System Presentation
 
Metrics 101
Metrics 101Metrics 101
Metrics 101
 
Internal Medicine Image Challenge MCQs
Internal Medicine Image Challenge MCQsInternal Medicine Image Challenge MCQs
Internal Medicine Image Challenge MCQs
 
Micro Expressions
Micro ExpressionsMicro Expressions
Micro Expressions
 
Philippine Indigenous Art
Philippine Indigenous ArtPhilippine Indigenous Art
Philippine Indigenous Art
 
Introduction to radiation therapy
Introduction to radiation therapyIntroduction to radiation therapy
Introduction to radiation therapy
 

Similar to ePub 3, HTML 5 & CSS 3 (+ Fixed-Layout)

web technologiesUnit 1
web technologiesUnit 1web technologiesUnit 1
web technologiesUnit 1
Pathi Radhika
 
Web Development From the Ground Up, a Series for Novice ...
Web Development From the Ground Up, a Series for Novice ...Web Development From the Ground Up, a Series for Novice ...
Web Development From the Ground Up, a Series for Novice ...
webhostingguy
 

Similar to ePub 3, HTML 5 & CSS 3 (+ Fixed-Layout) (20)

Html5 Brown Bag
Html5 Brown BagHtml5 Brown Bag
Html5 Brown Bag
 
HTML5: Smart Markup for Smarter Websites [Future of Web Apps, Las Vegas 2011]
HTML5: Smart Markup for Smarter Websites [Future of Web Apps, Las Vegas 2011]HTML5: Smart Markup for Smarter Websites [Future of Web Apps, Las Vegas 2011]
HTML5: Smart Markup for Smarter Websites [Future of Web Apps, Las Vegas 2011]
 
Down and Dirty EPUB 3
Down and Dirty EPUB 3Down and Dirty EPUB 3
Down and Dirty EPUB 3
 
A practical guide to building websites with HTML5 & CSS3
A practical guide to building websites with HTML5 & CSS3A practical guide to building websites with HTML5 & CSS3
A practical guide to building websites with HTML5 & CSS3
 
web technologiesUnit 1
web technologiesUnit 1web technologiesUnit 1
web technologiesUnit 1
 
UNC Chapel Hill 2014 CTC Retreat - Creating epub e books
UNC Chapel Hill 2014 CTC Retreat - Creating epub e booksUNC Chapel Hill 2014 CTC Retreat - Creating epub e books
UNC Chapel Hill 2014 CTC Retreat - Creating epub e books
 
Html5
Html5Html5
Html5
 
Kick start @ html5
Kick start @ html5Kick start @ html5
Kick start @ html5
 
Html5 tutorial
Html5 tutorialHtml5 tutorial
Html5 tutorial
 
Html5 tutorial
Html5 tutorialHtml5 tutorial
Html5 tutorial
 
Html5 tutorial
Html5 tutorialHtml5 tutorial
Html5 tutorial
 
Html5 tutorial
Html5 tutorialHtml5 tutorial
Html5 tutorial
 
Html5 tutorial
Html5 tutorialHtml5 tutorial
Html5 tutorial
 
HTML5 and Beyond
HTML5 and BeyondHTML5 and Beyond
HTML5 and Beyond
 
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5
 
Oreilly
OreillyOreilly
Oreilly
 
What book and journal publishers need to know to get accessibility right
What book and journal publishers need to know to get accessibility rightWhat book and journal publishers need to know to get accessibility right
What book and journal publishers need to know to get accessibility right
 
Html5 deciphered - designing concepts part 1
Html5 deciphered - designing concepts part 1Html5 deciphered - designing concepts part 1
Html5 deciphered - designing concepts part 1
 
Web Development From the Ground Up, a Series for Novice ...
Web Development From the Ground Up, a Series for Novice ...Web Development From the Ground Up, a Series for Novice ...
Web Development From the Ground Up, a Series for Novice ...
 
Le Wagon - Landing page
Le Wagon - Landing pageLe Wagon - Landing page
Le Wagon - Landing page
 

Recently uploaded

Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 

Recently uploaded (20)

Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomSalesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCustom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 
Optimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityOptimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through Observability
 
In-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT ProfessionalsIn-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT Professionals
 
UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2
 
IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and Planning
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
 
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 

ePub 3, HTML 5 & CSS 3 (+ Fixed-Layout)

  • 1. From HTML 5 & CSS 3... To ePub 3 @cwehrung
  • 4. definition EPUB defines a means of representing, packaging and encoding structured and semantically enhanced Web content — including HTML5, CSS, SVG, images, and other resources — for distribution in a single-file format.
  • 5. JavaScript Behavior HTML 5 CSS 3 Content Style ePub 3 Package Technologies (theory)
  • 6. HTML Result CSS
  • 7. JavaScript Behavior HTML 5 CSS 3 Content Style ePub 3 Package HTML 5
  • 8. Audio+Video Interactivity Flash Geolocation Local Storage
  • 9. DEVICES SUPPORT HTML 5 <canvas> ::geoloc:: <audio> <video> MathML iBooks ✓ Sort Of * ✓ ✓ ✓ NOOK Color/ Tablet ✘ ✘ ✓ ✓ ✘ Safari Books Online ✓ ✓ ✓ ✓ ✓ Kindle Apps ✘ ✘ ✓ ✓ ✘ Kindle Fire ✘ ✘ ✘ ✘ ✘
  • 10. JavaScript Behavior HTML 5 CSS 3 Content Style ePub 3 Package CSS 3 (theory)
  • 11. Animations Shadows Support varies -webkit, -moz, ... Regions
  • 12. Media Queries HTML 4 <link rel="stylesheet" type="text/css" media="screen" href="sans-serif.css"> <link rel="stylesheet" type="text/css" media="print" href="serif.css"> CSS 3 @media screen { * { font-family: sans-serif } }
  • 13. Media Queries HTML 4 <link rel="stylesheet" media="screen and (color)" href="example.css" /> CSS 3 @import url(color.css) screen and (color); Other examples: @media (orientation: portrait) { … } @media (min-width:500px) { … }
  • 14. Selectors You already know: a:link /* unvisited links */ a:visited /* visited links */ a:hover /* user hovers */ a:active /* active links */ An example of combining dynamic pseudo-classes: a:focus a:focus:hover
  • 15. Selectors The ::before and ::after pseudo-elements h1:before { content : "> " } Structural pseudo-classes tr:nth-child(odd) /* represents every odd row of an HTML table */ tr:nth-child(even) /* represents every even row of an HTML table */ /* Alternate paragraph colours in CSS */ p:nth-child(4n+1) { color: navy; } p:nth-child(4n+2) { color: green; } p:nth-child(4n+3) { color: maroon; } p:nth-child(4n+4) { color: purple; }
  • 16. Selectors div > p:first-child This selector represents a p element that is the first child of a div element: <p> The last P before the note.</p> <div class="note"> <p> The first P inside the note.</p> </div> but cannot represent the second p in the following fragment: <p> The last P before the note.</p> <div class="note"> <h2> Note </h2> <p> The first P inside the note.</p> </div>
  • 17. Selectors p { color: red; font-size: 12pt } p::first-letter { color: green; font-size: 200% } p::first-line { color: blue } <P>A bird in the hand is worth two in the bush...</P>
  • 18. Combinators Descendant combinator E F (1) — matches an element F that’s a descendant of an element E. Note that descendant combinators target all descendants and not just direct children. ul li {background: red;} <ul> <li>List Item 1</li> <li>List Item 2 <ol> <li>List Item 2-1</li> <li>List Item 2-2</li> </ol> </li> <li>List Item 3</li> </ul>
  • 19. Combinators Child combinator E > F (2) — matches an element F that’s a child of an element E. The difference here is that F must be a direct child of E. ul>li {background: red;} <ul> <li>List Item 1</li> <li>List Item 2 <ol> <li>List Item 2-1</li> <li>List Item 2-2</li> </ol> </li> <li>List Item 3</li> </ul>
  • 20. Combinators Adjacent sibling combinator E + F (2) — matches an element F immediately preceded by an element E. Note the word adjacent. Only the first element F after E will be targeted. h1+p {background: red;} <h1>Heading</h1> <p>Paragraph 1</p> <p>Paragraph 2</p> <p>Paragraph 3</p>
  • 21. Combinators General sibling combinator E ~ F (3) — matches an element F preceded by an element E. Unlike the above this will match any sibling and not just the first. h1+p {background: red;} <h1>Heading</h1> <p>Paragraph 1</p> <p>Paragraph 2</p> <p>Paragraph 3</p>
  • 22. JavaScript Behavior HTML 5 CSS 3 Content Style ePub 3 Package ePub 3
  • 23. ePUB mimetype OEBPS META-INF Container ( iBooks ) Options
  • 26. EPUB 3 FEATURES Semantic Inflection Audio+Video Content Switching Speech & Manifest Fallbacks NCX Embedded Fonts SVG Metadata Media Overlays Triggers+Binding MathML DTBook Guide ⇢ NavigationDocuments
  • 27. ePub 2 ePub 3 CSS 3 ✘ ✓ HTML 5 ✘ ✓ SVG In XHTML Direct in Spine Fonts Only built-in OTF & WOFF @font-face Audio & Video ✘ ✓ JavaScript ✘ optionally supported Multiple Stylesheets ✘ ✓ Alternative to XHTML DTBook HTML 5 Table of Content NCX Navigation Documents
  • 28. ToC ePub 2 <?xml  version="1.0"  encoding="UTF-­‐8"?> <ncx  xmlns="http://www.daisy.org/z3986/2005/ ncx/"  version="2005-­‐1"  xml:lang="en-­‐US"> <head> <meta  name="dtb:uid"  content="p9780316000000"/> </head> <docTitle> <text>Moby-­‐Dick</text> </docTitle> <docAuthor> <text>Herman  Melville</text> </docAuthor> <navMap> (...) <navPoint  playOrder="4"  id="introduction_001"> <navLabel> <text>ETYMOLOGY.</text> </navLabel> <content  src="introduction_001.html"/> </navPoint> <navPoint  playOrder="5"  id="epigraph_001"> <navLabel> <text>EXTRACTS  (Supplied  by  a  Sub-­‐Sub-­‐ Librarian).</text> </navLabel> <content  src="epigraph_001.html"/> </navPoint>
  • 29. ToC ePub 3 <html  xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" profile="http://www.idpf.org/epub/30/profile/ content/"> <head> <title>Moby-­‐Dick</title> </head> <body> <nav  id="toc"  epub:type="toc"> <h1>Contents</h1> <ol> <li  id="cover"> <a  href="cover.html">Cover</a> </li> <li  id="titlepage"> <a  href="titlepage.html">Title  Page</a> </li> <li  id="preface_001"> <a  href="preface_001.html">Original   Transcriber&#x2019;s  Notes:</a> </li> <li  id="introduction_001"> <a  href="introduction_001.html">ETYMOLOGY.</a> </li> <li  id="epigraph_001"> <a  href="epigraph_001.html">EXTRACTS  (Supplied   by  a  Sub-­‐Sub-­‐Librarian).</a> </li>
  • 30. ePUB META-INF OEBPS content.opf mimetype OEBPS ↬ <metadata> ↬ <manifest> ↬ <spine> Container ( iBooks ) Options ↬ <guide>
  • 31. content.opf <?xml version="1.0" encoding="utf-8" standalone="no"?> <package xmlns="http://www.idpf.org/2007/opf" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0" unique-identifier="bookid"> <metadata> <dc:identifier id="bookid">urn:uuid:9782081266766</dc:identifier> <dc:title>My Little Paris</dc:title> <dc:publisher>Gutenberg Technology</dc:publisher> <dc:date >2012-02-07</dc:date> <dc:creator xmlns:opf="http://www.idpf.org/2007/opf" opf:file-as="Daly, Liza">Vasak, Vladimir</dc:creator> <dc:language>fr</dc:language> <meta name="cover" content="cover-image"/> </metadata> <manifest> <item id="ncxtoc" media-type="application/x-dtbncx+xml" href="toc.ncx" /> <item id="cover-image" media-type="image/jpeg" href="cover.jpg" /> <item id="font1" media-type="application/octet-stream" href="fonts/BZLJKT_HelveticaNeue- Light.ttf" /> <item id="css1" media-type="text/css" href="1.css" /> <item id="page1" media-type="application/xhtml+xml" href="1.html" /> </manifest> <spine toc="ncxtoc"> <itemref idref="page1" linear="yes" /> <itemref idref="page2" linear="yes" /> <itemref idref="page3" linear="yes" /> </spine> <guide> <reference type="cover" title="Cover" href="1.html"/> <reference type="text" title="Cover" href="1.html"/> </guide> </package>
  • 34. media overlays ↬ Speech In content.opf : <item id="smil-003" href="smil/page1.smil" media-type="application/smil+xml"/> In page1.xhtml : <p> <span id="word1">Once</span> <span id="word2">upon</span> <span id="word3">a</span> <span id="word4">time</span>... </p>
  • 35. <?xml version="1.0" encoding="UTF-8"?> SMIL <smil xmlns="http://www.w3.org/ns/SMIL" xmlns:epub="http://www.idpf.org/2011/epub" version="3.0" profile="http://www.idpf.org/epub/30/profile/content/"> <body> <par id="id1"> <!-- Once --> <text src="../page003.xhtml#word1"/> <audio clipBegin="0.562419" clipEnd=".990" src="../audio/ yellow_submarine.m4a"/> </par> <par id="id2"> <!-- upon --> <text src="../page003.xhtml#word2"/> <audio clipBegin="0.993" clipEnd="1.345" src="../audio/yellow_submarine.m4a"/> </par> <par id="id3"> <!-- a --> <text src="../page003.xhtml#word3"/> <audio clipBegin="1.345" clipEnd="1.442" src="../audio/yellow_submarine.m4a"/> </par> <par id="id4"> <!-- time --> <text src="../page003.xhtml#word4"/> <audio clipBegin="1.442" clipEnd="1.873659" src="../audio/ yellow_submarine.m4a"/> </par> </body> </smil>
  • 37. JavaScript HTML 5 CSS 3 ePub 3 ePub 3 (theory)
  • 38. JavaScript HTML 5 CSS 3 ePub 3 Apple (new)
  • 39. JavaScript HTML 5 CSS 3 ePub 3 Apple (new)
  • 42. LAYOUT TYPES ab le... ef low N ot R
  • 45. Reflowable Fixed-Layout
  • 47.
  • 48. ToC fixed-layout <html  xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" profile="http://www.idpf.org/epub/30/profile/content/"> <head> ✗ <title>Moby-­‐Dick</title> </head> <body> <nav  id="toc"  epub:type="toc"> <h1>Contents</h1> <ol> <li  id="cover"> <a  href="cover.html">Cover</a> </li> <li  id="titlepage"> <a  href="titlepage.html">Title  Page</a> </li> <li  id="preface_001"> <a  href="preface_001.html">Original  Transcriber&#x2019;s   Notes:</a> </li> <li  id="introduction_001"> <a  href="introduction_001.html">ETYMOLOGY.</a> </li> not compulsory <li  id="epigraph_001"> <a  href="epigraph_001.html">EXTRACTS  (Supplied  by  a  Sub-­‐ ⇢ links in page Sub-­‐Librarian).</a> </li> (...)
  • 49. viewport + metadata ? In META-INF/com.apple.ibooks.display-options.xml <?xml  version="1.0"  encoding="UTF-­‐8"?> <display_options> <platform  name="*"> <option  name="fixed-­‐layout">true</option> </platform> </display_options> In any xhtml content <meta  name="viewport"  content="width=512,  height=758"></meta> In any css stylesheet body  {  width:  758px;  height:  512px;  }
  • 50. JavaScript HTML 5 CSS 3 ePub 3 ePub 3 (theory)
  • 51. JavaScript HTML 5 CSS 3 Fixed-Layout ePub 3 ePub 3 (theory)
  • 52. JavaScript HTML 5 CSS 3 Fixed-Layout ePub 3 Apple (new)
  • 53. Standard Retina@2x
  • 55. standard... vs. Retina
  • 56.
  • 59.
  • 60. i ze ! F ileS
  • 61.
  • 62. fixed-layout rules <guid e> spread vs. page orientatio size ratio n -lock resolution @media & rendition
  • 63. fixed-layout limits Retina localStorage “touch” margins -webkit-le tter-spaci n g sc ree n> ! full <