SlideShare uma empresa Scribd logo
1 de 69
Making Your
Site Printable
Presented by Adrian Roselli
September 14, 2013, WordCamp Buffalo
#wcbuf
Making Your
Site Printable
Presented by Adrian Roselli
September 14, 2013, WordCamp Buffalo
#wcbuf
Photo (and notes) of Lafayette Square (1905) available at Shorpy: http://www.shorpy.com/node/12193
About Adrian Roselli
• Co-written four books.
• Technical editor
for two books.
• Written over fifty
articles, most recently
for .net Magazine and
Web Standards Sherpa.
#wcbuf
About Adrian Roselli
• Member of W3C HTML Working Group, W3C
Accessibility Task Force, five W3C Community
Groups.
• Building for the web since 1994.
• Founder, owner at Algonquin Studios
(AlgonquinStudios.com).
• Learn more at AdrianRoselli.com.
• Avoid on Twitter @aardrian.
#wcbuf
What We’ll Cover
#wcbuf
What We’ll Cover
• Background
• Techniques
• Measuring
• Future
• Questions (ongoing!)
#wcbuf
Background
#wcbuf
Responsive Web Design (RWD)
• Responsive design (or
adaptive design) is about
supporting any device:
• Desktop computer
• Smartphone
• Tablet
• Television
• Printer?
#wcbufPhoto of printed page from http://elliotjaystocks.com/blog/has-adaptive-design-failed-of-course-it-bloody-hasnt/
PrintShame.com
• As developers tout their responsive designs,
they often forget the printed page.
• Support for print styles goes back more than a
decade, before RWD.
• Used MediaQueri.es as initial seed, then
picked up from articles, awards, etc.
• Hoped shaming might improve state of print
styles.
• http://PrintShame.com
#wcbuf
PrintShame.com
#wcbufhttp://www.printshame.com/2013/09/generateconfcom.html
PrintShame.com
#wcbufSource page: http://www.generateconf.com/schedule/
Maturing (a bit)
• Decided the best approach would be teaching.
• Used lessons, common issues from
PrintShame to develop tutorial(s).
• Pitched this very talk.
#wcbuf
Print Services
• Add a third-party “print” button to your site.
• You have no control over layout.
• You have no control over ads.
• You have no control.
#wcbuf
Print Services
#wcbufhttp://rosel.li/040612 “More Evidence of the Need for Print Styles”
Techniques
#wcbuf
Screen versus Print
Screen
• Continuous
• Visual, audible, tactile
• Vector and bitmap
• Interactive
• Online
Print
• Paged
• Visual
• Bitmap
• Static
• Offline
#wcbuf
Planning
• Is my site built mobile-first?
• Things I want the user to see.
• Things the user may not want to see.
• Things that probably won’t print anyway.
#wcbuf
Planning
• Is my site built mobile-first?
• Sometimes your mobile-first styles will get you
nearly all the way there.
• If you built desktop-first, you may be able to re-
use your smaller viewport styles.
#wcbuf
Planning
• Things I want the user to see:
• Branding
• Cross-branding
• Page address
• Copyright
• Path to page (breadcrumb)
• Link addresses (?)
#wcbuf
Planning
• Things the user may not want to see:
• Primary navigation
• Secondary navigation
• Site search
• Social media icons
• Ad banners
• Fat footers
#wcbuf
Planning
• Things that probably won’t print anyway:
• Colors
• Backgrounds (images and colors)
• Bits of timed / interactive elements
• White elements (logos, text, effects)
#wcbuf
Example Site
#wcbufhttp://AdrianRoselli.com/Bio
Example Site
#wcbufhttp://AdrianRoselli.com/Bio
Example Site
#wcbufhttp://AdrianRoselli.com/Bio
Example Site
#wcbufhttp://algonquinstudios.com/Engage/Careers/DeveloperI
Example Site
#wcbufhttp://algonquinstudios.com/Engage/Careers/DeveloperI
Example Site
#wcbufhttp://algonquinstudios.com/Engage/Careers/DeveloperI
Example Site
#wcbufhttp://buffalosoccerclub.org/about
Example Site
#wcbufhttp://buffalosoccerclub.org/about
Example Site
#wcbufhttp://buffalosoccerclub.org/about
Embedding Print Styles
Make a home for your print styles:
@media print {
/* insert your style declarations here */
}
Or:
<link rel="stylesheet" type="text/css"
href="/css/print.css" media="print">
#wcbuf
Page Rules
The @page rule allows you to specify page
margins (CSS 2.1), size and orientation (CSS3).
@page {
margin: 20cm;
size: A4 landscape;
}
I recommend you do not use it and defer to user
preferences.
#wcbuf
Banner
Change the banner text to print units, adjust the
color so the printer doesn’t replace it with gray.
#Banner p#Title {
font-size: 24pt;
}
#Banner p#Title a, #Banner p#Title a:link, #Banner p#Title
a:visited {
color: #000;
}
#wcbuf
Navigation
Get rid of the primary, secondary, tertiary
navigation, remove social media links, and other
bits that won’t make sense when printed.
#Nav, #FlyOutNav, #SubNav, .NoPrint, p.CodeAlert,
#SMLinks, {
display: none;
}
#wcbuf
Breadcrumb
Keep the breadcrumb as a wayfinding method, but
reduce its size and remove any links.
#Bread a:link, #Bread a:visited {
text-decoration: underline;
color: #000;
}
#Bread {
color: #000;
font-size: 6pt;
}
#Bread > a:after {
content: "";
}
#wcbuf
Footer
Shrink the text, remove the search box, handle
my cross-branding.
#Footer {
font-size: 6pt;
color: #000;
}
#SearchForm {
display: none;
}
#Footer img {
float: right;
}
#wcbuf
In-Page Links
Select links in content container(s) and then
display the href value as text after the link.
#Content a[href]:after {
content: " [" attr(href) "] ";
word-wrap: break-word;
}
#Content a[href^="#"]:after, #Content
a[href^="tel"]:after, #Content a[href^="mailto"]:after,
#Content a[href^="javascript"]:after {
content: "";
}
Yes, you can do the inverse selector, but then I don’t get to show the variations!
#wcbuf
General Styles
• Clear whitespace around the content.
• User’s print settings will handle page margins.
• Let’s user get as much content on a page as
possible (yay for trees!)
• You shouldn’t need to worry about portrait vs.
landscape, A4 vs. 8.5×11, etc.
#wcbuf
General Styles
• Reset type sizes to points, set text to black.
• Points (mostly) provide more consistent text size
across browsers and devices than pixels.
• Light grey text doesn’t trigger browser overrides
to convert text to black.
• Not all users have color printers. Set red to black
so it doesn’t come out as a medium gray (perhaps
with other styles as appropriate).
#wcbuf
General Styles
body {
background: #fff;
color: #000;
font-size: 8pt;
line-height: 150%;
margin: 0;
}
hr {
color: #ccc;
background-color: #ccc;
}
h1, h2, h3, h4, h5, h6, code, pre {
color: #000;
text-transform: none;
page-break-after: avoid;
}
#wcbuf
General Styles
h1 {
font-size: 11pt;
margin-top: 1em;
}
h2 {
font-size: 10pt;
}
h3 {
font-size: 9pt;
}
h4, h5, h6 {
font-size: 8pt;
}
img {
max-width: 100%;
}
#wcbuf
General Styles
code, pre {
font-size: 8pt;
background-color: transparent;
}
blockquote {
background-image: none;
}
a:link, a:visited {
text-decoration: underline;
color: #000;
}
abbr:after, acronym:after {
content: " (" attr(title) ") ";
}
ol, ul, img, table {
page-break-inside: avoid;
}
#wcbuf
General Styles
• Write values of title (or alt, or data-*, etc.)
attributes into the page.
• Think @cite on blockquote, or @title on abbr.
• You can do this with most attributes on most
elements, although it might not be a good fit.
• Perhaps a @data-shortURL attribute to display a
minified link address to make it easier for users to
type URLs.
• A novel way to promote @longdesc.
#wcbuf
Page Breaks
The CSS properties page-break-before, page-
break-after and page-break-inside have the
following values:
• auto: default value, no specified behavior.
• avoid: tries to avoid a page-break.
• always: invokes a page-break (not for page-break-
inside).
• left | right: Tries to place element on the start of a page
on the left or right, for when you are printing bound material
(books, magazines, etc.) (not for page-break-inside).
#wcbuf
Widows and Orphans
Use these to control how many lines must be at
the end of a page (orphans) or how many at the
start of a page (widows).
p {
orphans: 3; /* 3 consecutive lines at end of page */
widows: 2; /* 2 lines at start of new page */
}
Because widows and orphans are confusing: http://en.wikipedia.org/wiki/Widows_and_orphans
#wcbuf
Invert Logos
For those rare cases with a white logo where
you can’t load an alternate image (Chrome &
Safari only):
Img#Logo {
-webkit-filter: invert(100%);
filter: invert(100%);
}
If you can load an alternate, a quick tutorial:
http://www.456bereastreet.com/archive/201305/replacing_images_when_printing/
#wcbuf
Further Consideration
• Hide videos.
• Hide controls for embedded audio.
• Hide Flash movies.
• Hide canvas elements (assuming interactive).
• Don’t scale images to 100% width.
• Determine if ads should be printed or not.
#wcbuf
QR Codes
• They’re a personal (lifestyle) choice.
• Allows more savvy users to get directly to the
source of the printed page.
• Easy to implement without burdening mobile
users, users who do not print.
#wcbuf
Call the QR Code
<html>
<head>
<style>
@media print {
header::before { content:
url(http://chart.apis.google.com/chart?chs=120x120&cht=qr&
chl=http%3A%2F%2Falgonquinstudios.com/Engage/Careers); }
}
</style>
</head>
#wcbuf
QR Code in Use
#wcbuf
Outliers
• Sadly, not every device
behaves.
• Samsung Galaxy S4,
default Android browser.
#wcbuf
Outliers
#wcbuf
TEST!
• Print to PDF for your first (most) rounds.
• Use every browser you can.
• At very least, use every browser that visits
your site.
• Change paper size (8.5″ × 11″, A4, etc.).
• Change paper orientation.
• Scale the content in the print dialog.
#wcbuf
Measuring
#wcbuf
Google Analytics
• Call the GA tracking image, but only when the
print styles get used.
• Attach a custom event to that image.
• View custom events in Google Analytics.
• Identify which pages get printed.
• Make sure that at least those pages print well.
• Compare to your carousel.
#wcbufFull tutorial: http://rosel.li/032613
Query String Parameters
#wcbuf
Variable Description
utmac Account String. Appears on all requests. This is your UA-#######-# ID.
utmwv
Tracking code version. While my standard GA requests use 5.4.0, I opted to use 4.3 for reasons I no
longer recall.
utmn
Unique ID generated for each GIF request to prevent caching of the GIF image. I just concatenate the
current year, month, day, hour, minute and second.
utmhn Host Name of your site, which is a URL-encoded string.
utmr Referral, complete URL. In this case I just insert a dash so it is not blank.
utmp Page request of the current page.
utmt
Indicates the type of request, which is one of: event, transaction, item, or a custom variable. If
you leave it blank, it defaults to page. Because I am tracking events, I use event.
utme Extensible parameter. This is where you write your event. I use 5(Print*{page address}).
utmcc
Cookie values. This request parameter sends all the cookies requested from the page. It can get
pretty long. It must be URL encoded. It must include __utma and __utmz values.
Sample Query String
http://www.google-analytics.com/__utm.gif
?utmac=UA-1464893-3
&utmwv=4.3
&utmn=2013326124551
&utmhn=algonquinstudios.com
&utmr=-
&utmp=/Engage/Careers
&utmt=event
&utme=5%28Print*/Engage/Careers%29
&utmcc=__utma%3D267504222.1477743002.1364314722.1364314722
.1364314722.1%3B%2B__utmb%3D267504222.17.7.1364314901604%3
B%2B__utmz%3D267504222.1364314722.1.1.utmcsr%3D%28direct%2
9|utmccn%3D%28direct%29|utmcmd%3D%28none%29
#wcbuf
Call the Image
<html>
<head>
<style>
@media print {
header::after { content: url(http://www.google-
analytics.com/__utm.gif?utmac=UA-1464893-
3&utmwv=4.3&utmn=2013326124551&utmhn=algonquinstudios.com&
utmr=&utmp=/Engage/Careers&utmt=event&utme=5%28Print*/Enga
ge/Careers%29&utmcc=__utma%3D267504222.1477743002.13643147
22.1364314722.1364314722.1%3B%2B__utmb%3D267504222.17.7.13
64314901604%3B%2B__utmz%3D267504222.1364314722.1.1.utmcsr%
3D%28direct%29|utmccn%3D%28direct%29|utmcmd%3D%28none%29);
}
}
</style>
</head>
#wcbuf
Check the Data
#wcbuf
Check the Data
#wcbuf
Future
#wcbuf
Here or on Its Way
• Browser support for existing features.
• Electronic Books.
• HTML5 as a publishing platform.
• CSS3, CSS4.
#wcbuf
Left, Right, First Pages
• Use @page rule with pseudo classes to specify
right, left, first:
• :right will affect the page on the right.
• :left will affect the page on the left.
• :first will affect the first page.
• :blank will affect the blank pages resulting from forced break.
• An @page rule with no pseudo classes applies
to all pages.
#wcbuf
Bleed and Crops
• The bleed property relies on the crops
property having a value.
• Bleed specifies how much the page can
extend outside the page box:
• <length> units, referring to width of page box.
• Crop draws marks outside page box:
• crop: shows where a page should be cut.
• cross: used to align sheets.
#wcbuf
Boxes across Pages
• The box-decoration-break specifies how a
box’s background, margin and border behave
when broken across pages:
• slice: chops the box in two.
• clone: duplicates the styles
onto each box.
#wcbuf
Page Margin Boxes
@page {
@bottom-left {
content: "Copyright me."
}
@bottom-right {
counter-increment: page;
content: "Page " counter(page);
}
}
#wcbuf
Wrap-up, Questions
#wcbuf
Further Reading
• Make your website printable with CSS:
http://netm.ag/WA93Xg
• Calling QR in Print CSS Only When Needed:
http://rosel.li/030813
• Tracking When Users Print Pages:
http://rosel.li/032613
• Tips And Tricks For Print Style Sheets:
http://coding.smashingmagazine.com/2013/03/08/tips-tricks-print-style-sheets/
• Printing The Web:
http://drublic.de/blog/printing-the-web/
• CSS Paged Media Level 2:
http://www.w3.org/TR/CSS2/page.html
• CSS Paged Media Module Level 3:
http://www.w3.org/TR/css3-page/
• Proposals for the future of CSS Paged Media:
http://dev.w3.org/csswg/css-page-4/
• Can you typeset a book with CSS?
http://www.w3.org/Talks/2013/0604-CSS-Tokyo/
#wcbuf
Making Your
Site Printable
Presented by Adrian Roselli
September 14, 2013, WordCamp Buffalo
#wcbuf
Thanks for staying! Tell your friends!
Photo (and notes) of Lafayette Square (1905) available at Shorpy: http://www.shorpy.com/node/12193

Mais conteúdo relacionado

Mais procurados

Design Swoon - Visual Trends & WordPress
Design Swoon - Visual Trends  & WordPressDesign Swoon - Visual Trends  & WordPress
Design Swoon - Visual Trends & WordPressSara Cannon
 
Responsive Design in WordPress
Responsive Design in WordPressResponsive Design in WordPress
Responsive Design in WordPressThad Allender
 
What is a URL 101 and Other Web Definitions
What is a URL 101 and Other Web DefinitionsWhat is a URL 101 and Other Web Definitions
What is a URL 101 and Other Web DefinitionsCowley Associates
 
Where are (web) designers going with web fonts?
Where are (web) designers going with web fonts?Where are (web) designers going with web fonts?
Where are (web) designers going with web fonts?Scott Boms
 
"Wordpress And Your Brand" 2010 - By Sara Cannon
"Wordpress And Your Brand" 2010 - By Sara Cannon"Wordpress And Your Brand" 2010 - By Sara Cannon
"Wordpress And Your Brand" 2010 - By Sara CannonSara Cannon
 
Put A Map On It! Enhanced geolocation in WordPress with Geo Mashup
Put A Map On It! Enhanced geolocation in WordPress with Geo MashupPut A Map On It! Enhanced geolocation in WordPress with Geo Mashup
Put A Map On It! Enhanced geolocation in WordPress with Geo MashupJer Clarke
 
All about WordPress Posts and Pages WordCamp 2013
All about WordPress Posts and Pages WordCamp 2013 All about WordPress Posts and Pages WordCamp 2013
All about WordPress Posts and Pages WordCamp 2013 New Tricks
 
Web Accessibility Gone Wild
Web Accessibility Gone WildWeb Accessibility Gone Wild
Web Accessibility Gone WildJared Smith
 
BDUG Responsive Web Theming - 7/23/12
BDUG Responsive Web Theming - 7/23/12BDUG Responsive Web Theming - 7/23/12
BDUG Responsive Web Theming - 7/23/12ucbdrupal
 
Everything Non-SEOs Need to Know about SEO
Everything Non-SEOs Need to Know about SEOEverything Non-SEOs Need to Know about SEO
Everything Non-SEOs Need to Know about SEOBrightEdge
 

Mais procurados (11)

Design Swoon - Visual Trends & WordPress
Design Swoon - Visual Trends  & WordPressDesign Swoon - Visual Trends  & WordPress
Design Swoon - Visual Trends & WordPress
 
Responsive Design in WordPress
Responsive Design in WordPressResponsive Design in WordPress
Responsive Design in WordPress
 
What is a URL 101 and Other Web Definitions
What is a URL 101 and Other Web DefinitionsWhat is a URL 101 and Other Web Definitions
What is a URL 101 and Other Web Definitions
 
Where are (web) designers going with web fonts?
Where are (web) designers going with web fonts?Where are (web) designers going with web fonts?
Where are (web) designers going with web fonts?
 
"Wordpress And Your Brand" 2010 - By Sara Cannon
"Wordpress And Your Brand" 2010 - By Sara Cannon"Wordpress And Your Brand" 2010 - By Sara Cannon
"Wordpress And Your Brand" 2010 - By Sara Cannon
 
Put A Map On It! Enhanced geolocation in WordPress with Geo Mashup
Put A Map On It! Enhanced geolocation in WordPress with Geo MashupPut A Map On It! Enhanced geolocation in WordPress with Geo Mashup
Put A Map On It! Enhanced geolocation in WordPress with Geo Mashup
 
All about WordPress Posts and Pages WordCamp 2013
All about WordPress Posts and Pages WordCamp 2013 All about WordPress Posts and Pages WordCamp 2013
All about WordPress Posts and Pages WordCamp 2013
 
Web Accessibility Gone Wild
Web Accessibility Gone WildWeb Accessibility Gone Wild
Web Accessibility Gone Wild
 
wcmia2011
wcmia2011wcmia2011
wcmia2011
 
BDUG Responsive Web Theming - 7/23/12
BDUG Responsive Web Theming - 7/23/12BDUG Responsive Web Theming - 7/23/12
BDUG Responsive Web Theming - 7/23/12
 
Everything Non-SEOs Need to Know about SEO
Everything Non-SEOs Need to Know about SEOEverything Non-SEOs Need to Know about SEO
Everything Non-SEOs Need to Know about SEO
 

Semelhante a Making your site printable: WordCamp Buffalo 2013

Making Your Site Printable: CSS Summit 2014
Making Your Site Printable: CSS Summit 2014Making Your Site Printable: CSS Summit 2014
Making Your Site Printable: CSS Summit 2014Adrian Roselli
 
Jennifer Robbins: ARTIFACT Conference Keynote
Jennifer Robbins: ARTIFACT Conference KeynoteJennifer Robbins: ARTIFACT Conference Keynote
Jennifer Robbins: ARTIFACT Conference KeynoteJenRobbins
 
Making Your Site Printable: Booster Conference
Making Your Site Printable: Booster ConferenceMaking Your Site Printable: Booster Conference
Making Your Site Printable: Booster ConferenceAdrian Roselli
 
Lab#10 navigation, links and hover rollovers
Lab#10 navigation, links and hover rolloversLab#10 navigation, links and hover rollovers
Lab#10 navigation, links and hover rolloversYaowaluck Promdee
 
How to create accessible websites - WordCamp New York
How to create accessible websites - WordCamp New YorkHow to create accessible websites - WordCamp New York
How to create accessible websites - WordCamp New YorkRachel Cherry
 
From PSD to WordPress Theme: Bringing designs to life
From PSD to WordPress Theme: Bringing designs to lifeFrom PSD to WordPress Theme: Bringing designs to life
From PSD to WordPress Theme: Bringing designs to lifeDerek Christensen
 
The Mobile Development Landscape
The Mobile Development LandscapeThe Mobile Development Landscape
The Mobile Development LandscapeAmbert Ho
 
Bootstrap Lab - ASNApalooza 2014
Bootstrap Lab - ASNApalooza 2014Bootstrap Lab - ASNApalooza 2014
Bootstrap Lab - ASNApalooza 2014John Nickell
 
Great Responsive-ability Web Design
Great Responsive-ability Web DesignGreat Responsive-ability Web Design
Great Responsive-ability Web DesignMike Wilcox
 
Introduction about wireframing and responsive webdesign
Introduction about wireframing and responsive webdesignIntroduction about wireframing and responsive webdesign
Introduction about wireframing and responsive webdesignipmindthegap
 
FITC - 2012-04-23 - Responsive Web Design
FITC - 2012-04-23 - Responsive Web DesignFITC - 2012-04-23 - Responsive Web Design
FITC - 2012-04-23 - Responsive Web DesignFrédéric Harper
 
Web Service Creation in HTML5
Web Service Creation in HTML5Web Service Creation in HTML5
Web Service Creation in HTML5Tero A. Laiho
 
Rich and Beautiful: Making Attractive Apps in HTML5 [Wpg 2013]
Rich and Beautiful: Making Attractive Apps in HTML5 [Wpg 2013]Rich and Beautiful: Making Attractive Apps in HTML5 [Wpg 2013]
Rich and Beautiful: Making Attractive Apps in HTML5 [Wpg 2013]David Wesst
 
Introduction to Responsive Design v.2
Introduction to Responsive Design v.2Introduction to Responsive Design v.2
Introduction to Responsive Design v.2Clarissa Peterson
 
Accessibility Hacks Version 2
Accessibility Hacks Version 2Accessibility Hacks Version 2
Accessibility Hacks Version 2Graham Armfield
 
Accessibility Hacks version 2
Accessibility Hacks version 2Accessibility Hacks version 2
Accessibility Hacks version 2Graham Armfield
 
Responsive Web Design_2013
Responsive Web Design_2013Responsive Web Design_2013
Responsive Web Design_2013Achieve Internet
 

Semelhante a Making your site printable: WordCamp Buffalo 2013 (20)

Making Your Site Printable: CSS Summit 2014
Making Your Site Printable: CSS Summit 2014Making Your Site Printable: CSS Summit 2014
Making Your Site Printable: CSS Summit 2014
 
Jennifer Robbins: ARTIFACT Conference Keynote
Jennifer Robbins: ARTIFACT Conference KeynoteJennifer Robbins: ARTIFACT Conference Keynote
Jennifer Robbins: ARTIFACT Conference Keynote
 
Making Your Site Printable: Booster Conference
Making Your Site Printable: Booster ConferenceMaking Your Site Printable: Booster Conference
Making Your Site Printable: Booster Conference
 
Lab#10 navigation, links and hover rollovers
Lab#10 navigation, links and hover rolloversLab#10 navigation, links and hover rollovers
Lab#10 navigation, links and hover rollovers
 
How to create accessible websites - WordCamp New York
How to create accessible websites - WordCamp New YorkHow to create accessible websites - WordCamp New York
How to create accessible websites - WordCamp New York
 
Web Design Trends: 2018 Edition
Web Design Trends: 2018 EditionWeb Design Trends: 2018 Edition
Web Design Trends: 2018 Edition
 
From PSD to WordPress Theme: Bringing designs to life
From PSD to WordPress Theme: Bringing designs to lifeFrom PSD to WordPress Theme: Bringing designs to life
From PSD to WordPress Theme: Bringing designs to life
 
The Mobile Development Landscape
The Mobile Development LandscapeThe Mobile Development Landscape
The Mobile Development Landscape
 
Bootstrap Lab - ASNApalooza 2014
Bootstrap Lab - ASNApalooza 2014Bootstrap Lab - ASNApalooza 2014
Bootstrap Lab - ASNApalooza 2014
 
Great Responsive-ability Web Design
Great Responsive-ability Web DesignGreat Responsive-ability Web Design
Great Responsive-ability Web Design
 
Introduction about wireframing and responsive webdesign
Introduction about wireframing and responsive webdesignIntroduction about wireframing and responsive webdesign
Introduction about wireframing and responsive webdesign
 
FITC - 2012-04-23 - Responsive Web Design
FITC - 2012-04-23 - Responsive Web DesignFITC - 2012-04-23 - Responsive Web Design
FITC - 2012-04-23 - Responsive Web Design
 
Web Service Creation in HTML5
Web Service Creation in HTML5Web Service Creation in HTML5
Web Service Creation in HTML5
 
Rich and Beautiful: Making Attractive Apps in HTML5 [Wpg 2013]
Rich and Beautiful: Making Attractive Apps in HTML5 [Wpg 2013]Rich and Beautiful: Making Attractive Apps in HTML5 [Wpg 2013]
Rich and Beautiful: Making Attractive Apps in HTML5 [Wpg 2013]
 
Introduction to Responsive Design v.2
Introduction to Responsive Design v.2Introduction to Responsive Design v.2
Introduction to Responsive Design v.2
 
Look ma! No images!
Look ma! No images!Look ma! No images!
Look ma! No images!
 
Accessibility Hacks Version 2
Accessibility Hacks Version 2Accessibility Hacks Version 2
Accessibility Hacks Version 2
 
Accessibility Hacks version 2
Accessibility Hacks version 2Accessibility Hacks version 2
Accessibility Hacks version 2
 
Sass & bootstrap
Sass & bootstrapSass & bootstrap
Sass & bootstrap
 
Responsive Web Design_2013
Responsive Web Design_2013Responsive Web Design_2013
Responsive Web Design_2013
 

Mais de Adrian Roselli

CSUN 2020: CSS Display Properties Versus HTML Semantics
CSUN 2020: CSS Display Properties Versus HTML SemanticsCSUN 2020: CSS Display Properties Versus HTML Semantics
CSUN 2020: CSS Display Properties Versus HTML SemanticsAdrian Roselli
 
Selfish Accessibility —DevOpsDays Buffalo
Selfish Accessibility —DevOpsDays BuffaloSelfish Accessibility —DevOpsDays Buffalo
Selfish Accessibility —DevOpsDays BuffaloAdrian Roselli
 
Selfish Accessibility — YGLF Vilnius
Selfish Accessibility — YGLF VilniusSelfish Accessibility — YGLF Vilnius
Selfish Accessibility — YGLF VilniusAdrian Roselli
 
Role of Design in Accessibility — VilniusJS Meet-up
Role of Design in Accessibility — VilniusJS Meet-upRole of Design in Accessibility — VilniusJS Meet-up
Role of Design in Accessibility — VilniusJS Meet-upAdrian Roselli
 
The Role of Design in Accessibility — a11yTO Meet-up
The Role of Design in Accessibility — a11yTO Meet-upThe Role of Design in Accessibility — a11yTO Meet-up
The Role of Design in Accessibility — a11yTO Meet-upAdrian Roselli
 
Prototyping Accessibility: Booster 2019
Prototyping Accessibility: Booster 2019Prototyping Accessibility: Booster 2019
Prototyping Accessibility: Booster 2019Adrian Roselli
 
Selfish Accessibility — Harbour Front HK
Selfish Accessibility — Harbour Front HKSelfish Accessibility — Harbour Front HK
Selfish Accessibility — Harbour Front HKAdrian Roselli
 
Selfish Accessibility — CodeDaze
Selfish Accessibility — CodeDazeSelfish Accessibility — CodeDaze
Selfish Accessibility — CodeDazeAdrian Roselli
 
Prototyping Accessibility - WordCamp Europe 2018
Prototyping Accessibility - WordCamp Europe 2018Prototyping Accessibility - WordCamp Europe 2018
Prototyping Accessibility - WordCamp Europe 2018Adrian Roselli
 
Guelph A11y Conf: Everything I Know About Accessibility I Learned from Stack ...
Guelph A11y Conf: Everything I Know About Accessibility I Learned from Stack ...Guelph A11y Conf: Everything I Know About Accessibility I Learned from Stack ...
Guelph A11y Conf: Everything I Know About Accessibility I Learned from Stack ...Adrian Roselli
 
Fringe Accessibility — Portland UX
Fringe Accessibility — Portland UXFringe Accessibility — Portland UX
Fringe Accessibility — Portland UXAdrian Roselli
 
WCBuf: CSS Display Properties versus HTML Semantics
WCBuf: CSS Display Properties versus HTML SemanticsWCBuf: CSS Display Properties versus HTML Semantics
WCBuf: CSS Display Properties versus HTML SemanticsAdrian Roselli
 
Mind Your Lang — London Web Standards
Mind Your Lang — London Web StandardsMind Your Lang — London Web Standards
Mind Your Lang — London Web StandardsAdrian Roselli
 
Inclusive Usability Testing - WordCamp London
Inclusive Usability Testing - WordCamp LondonInclusive Usability Testing - WordCamp London
Inclusive Usability Testing - WordCamp LondonAdrian Roselli
 
CSUN 2018: Everything I Know About Accessibility I Learned from Stack Overflow
CSUN 2018: Everything I Know About Accessibility I Learned from Stack OverflowCSUN 2018: Everything I Know About Accessibility I Learned from Stack Overflow
CSUN 2018: Everything I Know About Accessibility I Learned from Stack OverflowAdrian Roselli
 
Inclusive Usability Testing — a11yTOCamp
Inclusive Usability Testing — a11yTOCampInclusive Usability Testing — a11yTOCamp
Inclusive Usability Testing — a11yTOCampAdrian Roselli
 
Selfish Accessibility - Girl Develop It Buffalo
Selfish Accessibility - Girl Develop It BuffaloSelfish Accessibility - Girl Develop It Buffalo
Selfish Accessibility - Girl Develop It BuffaloAdrian Roselli
 
Everything I Know About Accessibility I Learned from Stack Overflow
Everything I Know About Accessibility I Learned from Stack OverflowEverything I Know About Accessibility I Learned from Stack Overflow
Everything I Know About Accessibility I Learned from Stack OverflowAdrian Roselli
 
Selfish Accessibility — WordCamp Europe 2017
Selfish Accessibility — WordCamp Europe 2017Selfish Accessibility — WordCamp Europe 2017
Selfish Accessibility — WordCamp Europe 2017Adrian Roselli
 
Inclusive User Testing — Guelph Accessibility Conference
Inclusive User Testing — Guelph Accessibility ConferenceInclusive User Testing — Guelph Accessibility Conference
Inclusive User Testing — Guelph Accessibility ConferenceAdrian Roselli
 

Mais de Adrian Roselli (20)

CSUN 2020: CSS Display Properties Versus HTML Semantics
CSUN 2020: CSS Display Properties Versus HTML SemanticsCSUN 2020: CSS Display Properties Versus HTML Semantics
CSUN 2020: CSS Display Properties Versus HTML Semantics
 
Selfish Accessibility —DevOpsDays Buffalo
Selfish Accessibility —DevOpsDays BuffaloSelfish Accessibility —DevOpsDays Buffalo
Selfish Accessibility —DevOpsDays Buffalo
 
Selfish Accessibility — YGLF Vilnius
Selfish Accessibility — YGLF VilniusSelfish Accessibility — YGLF Vilnius
Selfish Accessibility — YGLF Vilnius
 
Role of Design in Accessibility — VilniusJS Meet-up
Role of Design in Accessibility — VilniusJS Meet-upRole of Design in Accessibility — VilniusJS Meet-up
Role of Design in Accessibility — VilniusJS Meet-up
 
The Role of Design in Accessibility — a11yTO Meet-up
The Role of Design in Accessibility — a11yTO Meet-upThe Role of Design in Accessibility — a11yTO Meet-up
The Role of Design in Accessibility — a11yTO Meet-up
 
Prototyping Accessibility: Booster 2019
Prototyping Accessibility: Booster 2019Prototyping Accessibility: Booster 2019
Prototyping Accessibility: Booster 2019
 
Selfish Accessibility — Harbour Front HK
Selfish Accessibility — Harbour Front HKSelfish Accessibility — Harbour Front HK
Selfish Accessibility — Harbour Front HK
 
Selfish Accessibility — CodeDaze
Selfish Accessibility — CodeDazeSelfish Accessibility — CodeDaze
Selfish Accessibility — CodeDaze
 
Prototyping Accessibility - WordCamp Europe 2018
Prototyping Accessibility - WordCamp Europe 2018Prototyping Accessibility - WordCamp Europe 2018
Prototyping Accessibility - WordCamp Europe 2018
 
Guelph A11y Conf: Everything I Know About Accessibility I Learned from Stack ...
Guelph A11y Conf: Everything I Know About Accessibility I Learned from Stack ...Guelph A11y Conf: Everything I Know About Accessibility I Learned from Stack ...
Guelph A11y Conf: Everything I Know About Accessibility I Learned from Stack ...
 
Fringe Accessibility — Portland UX
Fringe Accessibility — Portland UXFringe Accessibility — Portland UX
Fringe Accessibility — Portland UX
 
WCBuf: CSS Display Properties versus HTML Semantics
WCBuf: CSS Display Properties versus HTML SemanticsWCBuf: CSS Display Properties versus HTML Semantics
WCBuf: CSS Display Properties versus HTML Semantics
 
Mind Your Lang — London Web Standards
Mind Your Lang — London Web StandardsMind Your Lang — London Web Standards
Mind Your Lang — London Web Standards
 
Inclusive Usability Testing - WordCamp London
Inclusive Usability Testing - WordCamp LondonInclusive Usability Testing - WordCamp London
Inclusive Usability Testing - WordCamp London
 
CSUN 2018: Everything I Know About Accessibility I Learned from Stack Overflow
CSUN 2018: Everything I Know About Accessibility I Learned from Stack OverflowCSUN 2018: Everything I Know About Accessibility I Learned from Stack Overflow
CSUN 2018: Everything I Know About Accessibility I Learned from Stack Overflow
 
Inclusive Usability Testing — a11yTOCamp
Inclusive Usability Testing — a11yTOCampInclusive Usability Testing — a11yTOCamp
Inclusive Usability Testing — a11yTOCamp
 
Selfish Accessibility - Girl Develop It Buffalo
Selfish Accessibility - Girl Develop It BuffaloSelfish Accessibility - Girl Develop It Buffalo
Selfish Accessibility - Girl Develop It Buffalo
 
Everything I Know About Accessibility I Learned from Stack Overflow
Everything I Know About Accessibility I Learned from Stack OverflowEverything I Know About Accessibility I Learned from Stack Overflow
Everything I Know About Accessibility I Learned from Stack Overflow
 
Selfish Accessibility — WordCamp Europe 2017
Selfish Accessibility — WordCamp Europe 2017Selfish Accessibility — WordCamp Europe 2017
Selfish Accessibility — WordCamp Europe 2017
 
Inclusive User Testing — Guelph Accessibility Conference
Inclusive User Testing — Guelph Accessibility ConferenceInclusive User Testing — Guelph Accessibility Conference
Inclusive User Testing — Guelph Accessibility Conference
 

Último

Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusZilliz
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 

Último (20)

Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 

Making your site printable: WordCamp Buffalo 2013

  • 1. Making Your Site Printable Presented by Adrian Roselli September 14, 2013, WordCamp Buffalo #wcbuf
  • 2. Making Your Site Printable Presented by Adrian Roselli September 14, 2013, WordCamp Buffalo #wcbuf Photo (and notes) of Lafayette Square (1905) available at Shorpy: http://www.shorpy.com/node/12193
  • 3. About Adrian Roselli • Co-written four books. • Technical editor for two books. • Written over fifty articles, most recently for .net Magazine and Web Standards Sherpa. #wcbuf
  • 4. About Adrian Roselli • Member of W3C HTML Working Group, W3C Accessibility Task Force, five W3C Community Groups. • Building for the web since 1994. • Founder, owner at Algonquin Studios (AlgonquinStudios.com). • Learn more at AdrianRoselli.com. • Avoid on Twitter @aardrian. #wcbuf
  • 6. What We’ll Cover • Background • Techniques • Measuring • Future • Questions (ongoing!) #wcbuf
  • 8. Responsive Web Design (RWD) • Responsive design (or adaptive design) is about supporting any device: • Desktop computer • Smartphone • Tablet • Television • Printer? #wcbufPhoto of printed page from http://elliotjaystocks.com/blog/has-adaptive-design-failed-of-course-it-bloody-hasnt/
  • 9. PrintShame.com • As developers tout their responsive designs, they often forget the printed page. • Support for print styles goes back more than a decade, before RWD. • Used MediaQueri.es as initial seed, then picked up from articles, awards, etc. • Hoped shaming might improve state of print styles. • http://PrintShame.com #wcbuf
  • 12. Maturing (a bit) • Decided the best approach would be teaching. • Used lessons, common issues from PrintShame to develop tutorial(s). • Pitched this very talk. #wcbuf
  • 13. Print Services • Add a third-party “print” button to your site. • You have no control over layout. • You have no control over ads. • You have no control. #wcbuf
  • 14. Print Services #wcbufhttp://rosel.li/040612 “More Evidence of the Need for Print Styles”
  • 16. Screen versus Print Screen • Continuous • Visual, audible, tactile • Vector and bitmap • Interactive • Online Print • Paged • Visual • Bitmap • Static • Offline #wcbuf
  • 17. Planning • Is my site built mobile-first? • Things I want the user to see. • Things the user may not want to see. • Things that probably won’t print anyway. #wcbuf
  • 18. Planning • Is my site built mobile-first? • Sometimes your mobile-first styles will get you nearly all the way there. • If you built desktop-first, you may be able to re- use your smaller viewport styles. #wcbuf
  • 19. Planning • Things I want the user to see: • Branding • Cross-branding • Page address • Copyright • Path to page (breadcrumb) • Link addresses (?) #wcbuf
  • 20. Planning • Things the user may not want to see: • Primary navigation • Secondary navigation • Site search • Social media icons • Ad banners • Fat footers #wcbuf
  • 21. Planning • Things that probably won’t print anyway: • Colors • Backgrounds (images and colors) • Bits of timed / interactive elements • White elements (logos, text, effects) #wcbuf
  • 31. Embedding Print Styles Make a home for your print styles: @media print { /* insert your style declarations here */ } Or: <link rel="stylesheet" type="text/css" href="/css/print.css" media="print"> #wcbuf
  • 32. Page Rules The @page rule allows you to specify page margins (CSS 2.1), size and orientation (CSS3). @page { margin: 20cm; size: A4 landscape; } I recommend you do not use it and defer to user preferences. #wcbuf
  • 33. Banner Change the banner text to print units, adjust the color so the printer doesn’t replace it with gray. #Banner p#Title { font-size: 24pt; } #Banner p#Title a, #Banner p#Title a:link, #Banner p#Title a:visited { color: #000; } #wcbuf
  • 34. Navigation Get rid of the primary, secondary, tertiary navigation, remove social media links, and other bits that won’t make sense when printed. #Nav, #FlyOutNav, #SubNav, .NoPrint, p.CodeAlert, #SMLinks, { display: none; } #wcbuf
  • 35. Breadcrumb Keep the breadcrumb as a wayfinding method, but reduce its size and remove any links. #Bread a:link, #Bread a:visited { text-decoration: underline; color: #000; } #Bread { color: #000; font-size: 6pt; } #Bread > a:after { content: ""; } #wcbuf
  • 36. Footer Shrink the text, remove the search box, handle my cross-branding. #Footer { font-size: 6pt; color: #000; } #SearchForm { display: none; } #Footer img { float: right; } #wcbuf
  • 37. In-Page Links Select links in content container(s) and then display the href value as text after the link. #Content a[href]:after { content: " [" attr(href) "] "; word-wrap: break-word; } #Content a[href^="#"]:after, #Content a[href^="tel"]:after, #Content a[href^="mailto"]:after, #Content a[href^="javascript"]:after { content: ""; } Yes, you can do the inverse selector, but then I don’t get to show the variations! #wcbuf
  • 38. General Styles • Clear whitespace around the content. • User’s print settings will handle page margins. • Let’s user get as much content on a page as possible (yay for trees!) • You shouldn’t need to worry about portrait vs. landscape, A4 vs. 8.5×11, etc. #wcbuf
  • 39. General Styles • Reset type sizes to points, set text to black. • Points (mostly) provide more consistent text size across browsers and devices than pixels. • Light grey text doesn’t trigger browser overrides to convert text to black. • Not all users have color printers. Set red to black so it doesn’t come out as a medium gray (perhaps with other styles as appropriate). #wcbuf
  • 40. General Styles body { background: #fff; color: #000; font-size: 8pt; line-height: 150%; margin: 0; } hr { color: #ccc; background-color: #ccc; } h1, h2, h3, h4, h5, h6, code, pre { color: #000; text-transform: none; page-break-after: avoid; } #wcbuf
  • 41. General Styles h1 { font-size: 11pt; margin-top: 1em; } h2 { font-size: 10pt; } h3 { font-size: 9pt; } h4, h5, h6 { font-size: 8pt; } img { max-width: 100%; } #wcbuf
  • 42. General Styles code, pre { font-size: 8pt; background-color: transparent; } blockquote { background-image: none; } a:link, a:visited { text-decoration: underline; color: #000; } abbr:after, acronym:after { content: " (" attr(title) ") "; } ol, ul, img, table { page-break-inside: avoid; } #wcbuf
  • 43. General Styles • Write values of title (or alt, or data-*, etc.) attributes into the page. • Think @cite on blockquote, or @title on abbr. • You can do this with most attributes on most elements, although it might not be a good fit. • Perhaps a @data-shortURL attribute to display a minified link address to make it easier for users to type URLs. • A novel way to promote @longdesc. #wcbuf
  • 44. Page Breaks The CSS properties page-break-before, page- break-after and page-break-inside have the following values: • auto: default value, no specified behavior. • avoid: tries to avoid a page-break. • always: invokes a page-break (not for page-break- inside). • left | right: Tries to place element on the start of a page on the left or right, for when you are printing bound material (books, magazines, etc.) (not for page-break-inside). #wcbuf
  • 45. Widows and Orphans Use these to control how many lines must be at the end of a page (orphans) or how many at the start of a page (widows). p { orphans: 3; /* 3 consecutive lines at end of page */ widows: 2; /* 2 lines at start of new page */ } Because widows and orphans are confusing: http://en.wikipedia.org/wiki/Widows_and_orphans #wcbuf
  • 46. Invert Logos For those rare cases with a white logo where you can’t load an alternate image (Chrome & Safari only): Img#Logo { -webkit-filter: invert(100%); filter: invert(100%); } If you can load an alternate, a quick tutorial: http://www.456bereastreet.com/archive/201305/replacing_images_when_printing/ #wcbuf
  • 47. Further Consideration • Hide videos. • Hide controls for embedded audio. • Hide Flash movies. • Hide canvas elements (assuming interactive). • Don’t scale images to 100% width. • Determine if ads should be printed or not. #wcbuf
  • 48. QR Codes • They’re a personal (lifestyle) choice. • Allows more savvy users to get directly to the source of the printed page. • Easy to implement without burdening mobile users, users who do not print. #wcbuf
  • 49. Call the QR Code <html> <head> <style> @media print { header::before { content: url(http://chart.apis.google.com/chart?chs=120x120&cht=qr& chl=http%3A%2F%2Falgonquinstudios.com/Engage/Careers); } } </style> </head> #wcbuf
  • 50. QR Code in Use #wcbuf
  • 51. Outliers • Sadly, not every device behaves. • Samsung Galaxy S4, default Android browser. #wcbuf
  • 53. TEST! • Print to PDF for your first (most) rounds. • Use every browser you can. • At very least, use every browser that visits your site. • Change paper size (8.5″ × 11″, A4, etc.). • Change paper orientation. • Scale the content in the print dialog. #wcbuf
  • 55. Google Analytics • Call the GA tracking image, but only when the print styles get used. • Attach a custom event to that image. • View custom events in Google Analytics. • Identify which pages get printed. • Make sure that at least those pages print well. • Compare to your carousel. #wcbufFull tutorial: http://rosel.li/032613
  • 56. Query String Parameters #wcbuf Variable Description utmac Account String. Appears on all requests. This is your UA-#######-# ID. utmwv Tracking code version. While my standard GA requests use 5.4.0, I opted to use 4.3 for reasons I no longer recall. utmn Unique ID generated for each GIF request to prevent caching of the GIF image. I just concatenate the current year, month, day, hour, minute and second. utmhn Host Name of your site, which is a URL-encoded string. utmr Referral, complete URL. In this case I just insert a dash so it is not blank. utmp Page request of the current page. utmt Indicates the type of request, which is one of: event, transaction, item, or a custom variable. If you leave it blank, it defaults to page. Because I am tracking events, I use event. utme Extensible parameter. This is where you write your event. I use 5(Print*{page address}). utmcc Cookie values. This request parameter sends all the cookies requested from the page. It can get pretty long. It must be URL encoded. It must include __utma and __utmz values.
  • 58. Call the Image <html> <head> <style> @media print { header::after { content: url(http://www.google- analytics.com/__utm.gif?utmac=UA-1464893- 3&utmwv=4.3&utmn=2013326124551&utmhn=algonquinstudios.com& utmr=&utmp=/Engage/Careers&utmt=event&utme=5%28Print*/Enga ge/Careers%29&utmcc=__utma%3D267504222.1477743002.13643147 22.1364314722.1364314722.1%3B%2B__utmb%3D267504222.17.7.13 64314901604%3B%2B__utmz%3D267504222.1364314722.1.1.utmcsr% 3D%28direct%29|utmccn%3D%28direct%29|utmcmd%3D%28none%29); } } </style> </head> #wcbuf
  • 62. Here or on Its Way • Browser support for existing features. • Electronic Books. • HTML5 as a publishing platform. • CSS3, CSS4. #wcbuf
  • 63. Left, Right, First Pages • Use @page rule with pseudo classes to specify right, left, first: • :right will affect the page on the right. • :left will affect the page on the left. • :first will affect the first page. • :blank will affect the blank pages resulting from forced break. • An @page rule with no pseudo classes applies to all pages. #wcbuf
  • 64. Bleed and Crops • The bleed property relies on the crops property having a value. • Bleed specifies how much the page can extend outside the page box: • <length> units, referring to width of page box. • Crop draws marks outside page box: • crop: shows where a page should be cut. • cross: used to align sheets. #wcbuf
  • 65. Boxes across Pages • The box-decoration-break specifies how a box’s background, margin and border behave when broken across pages: • slice: chops the box in two. • clone: duplicates the styles onto each box. #wcbuf
  • 66. Page Margin Boxes @page { @bottom-left { content: "Copyright me." } @bottom-right { counter-increment: page; content: "Page " counter(page); } } #wcbuf
  • 68. Further Reading • Make your website printable with CSS: http://netm.ag/WA93Xg • Calling QR in Print CSS Only When Needed: http://rosel.li/030813 • Tracking When Users Print Pages: http://rosel.li/032613 • Tips And Tricks For Print Style Sheets: http://coding.smashingmagazine.com/2013/03/08/tips-tricks-print-style-sheets/ • Printing The Web: http://drublic.de/blog/printing-the-web/ • CSS Paged Media Level 2: http://www.w3.org/TR/CSS2/page.html • CSS Paged Media Module Level 3: http://www.w3.org/TR/css3-page/ • Proposals for the future of CSS Paged Media: http://dev.w3.org/csswg/css-page-4/ • Can you typeset a book with CSS? http://www.w3.org/Talks/2013/0604-CSS-Tokyo/ #wcbuf
  • 69. Making Your Site Printable Presented by Adrian Roselli September 14, 2013, WordCamp Buffalo #wcbuf Thanks for staying! Tell your friends! Photo (and notes) of Lafayette Square (1905) available at Shorpy: http://www.shorpy.com/node/12193