SlideShare ist ein Scribd-Unternehmen logo
1 von 13
BUILDING WEBSITES FOR RETINA DISPLAYS:

  MAKING FRIENDS
   WITH PIXELS
              Shoshi Roberts
                @shoshizilla
PIXEL PERFECTION,
            NOT JUST FOR APPS
• Many devices have a 2x pixel density or higher (the iPhone 4
 is among them)

• Images   that are not optimized for them will be blurry and sad

• There   is no automatic standard for including hi-res images



      BUT THERE ARE SOME SOLUTIONS...
HOW BLURRY?
Not Optimized   Optimized
HOW BLURRY?
Not Optimized   Optimized
SHOW ME THE CODE!
#1 - FLUID LAYOUT

• First, use
          responsive or fluid design to create a page that
 looks great on all devices

• Alternatively, make   a mobile specific version of your site
#2 - USE CSS3
• Really, as    much as you like

• Mobile browsers, especially webkit, are largely up to date
  and support the latest properties.

• CSS3   for gradients, shadows, etc. will eliminate the need
  for using images in many cases

• It   improves performance! (like anything, when used in moderation)
#3 - OPTIMIZE YOUR IMAGES


• Make   2 versions:

 • One   at normal size (e.g. 100px by 100px)

 • One   at double size (e.g. 200px by 200px)
#4A - WRITE MEDIA QUERIES
h1.icon {
  width: 100px;
  height: 100px;
  /* This is your 100px by 100px image */
  background: transparent url(icon.png) 0 0 no-repeat;
}
@media screen and (-webkit-min-device-pixel-ratio: 2) and
                   (-o-min-device-pixel-ratio: 2) and
                   (min--moz-device-pixel-ratio: 2) and
                   (min-device-pixel-ratio: 2) {
  h1.icon {
    /* This is your 200px by 200px image */
    background: transparent url(icon-2x.png) 0 0 no-repeat;
       -moz-background-size: 100px 100px;    /* Firefox 3.6) */
          -o-background-size: 100px 100px;   /* Opera 9.5 */
    -webkit-background-size: 100px 100px;    /* Safari 3.0 */
             background-size: 100px 100px;
  }
}
#4B - OR USE SVG
HTML
<object data="icon.svg" type="image/svg+xml" class="vector">
</object>




CSS - Fluid
.vector {
  /* Use whatever percentages you like, the content will scale */
  width: 90%;
  height: 90%;
}
#5 - TEST, TEST, TEST!


• Look   at it on as many devices as you can.

• Pay   the most attention to the platforms your users visit on.
WRAPPING IT UP


• The   arms race for pixel density is on, make images that scale

• Use   a CSS3 when you can

• Use   media queries and SVG to optimize your image display
THANKS
        AND HAPPY HACKING!




  @shoshizilla for @ladieswhocode
Special Thanks to @mintdigital for hosting

Weitere ähnliche Inhalte

Was ist angesagt?

Grade vi presentation and visual effects
Grade vi presentation and visual effectsGrade vi presentation and visual effects
Grade vi presentation and visual effectsAnkita Shirke
 
Planning- Editing and software
Planning- Editing and software Planning- Editing and software
Planning- Editing and software megansimpson28
 
Lean video production software
Lean video production softwareLean video production software
Lean video production softwareLoCoMoTion Project
 
How to do a slideshow upload
How to do a slideshow uploadHow to do a slideshow upload
How to do a slideshow uploadcreativeartsclass
 
Changing the Wordpress theme
Changing the Wordpress themeChanging the Wordpress theme
Changing the Wordpress themeEdotensei15
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web DesignNir Elbaz
 
Power point essentials
Power point essentialsPower point essentials
Power point essentialsvalell
 
PowerPoint - Quick Reminders
PowerPoint - Quick RemindersPowerPoint - Quick Reminders
PowerPoint - Quick Reminderscm_scholz
 
The metro design language for app developers
The metro design language for app developersThe metro design language for app developers
The metro design language for app developersWillem Meints
 
Exploring Microsoft Surface
Exploring Microsoft SurfaceExploring Microsoft Surface
Exploring Microsoft SurfaceIndezine.com
 
Hb98908 midterm articulate powerpoint version
Hb98908 midterm articulate powerpoint versionHb98908 midterm articulate powerpoint version
Hb98908 midterm articulate powerpoint versionheatherb98908
 
Infinity Blade and beyond
Infinity Blade and beyondInfinity Blade and beyond
Infinity Blade and beyondozlael ozlael
 
SIUE IRIS Omeka Workshop
SIUE IRIS Omeka WorkshopSIUE IRIS Omeka Workshop
SIUE IRIS Omeka WorkshopKayla Hays
 
Customizability in Design Systems
Customizability in Design SystemsCustomizability in Design Systems
Customizability in Design SystemsSarah Federman
 
Adobe Lightroom Training Workshop Slides
Adobe Lightroom Training Workshop SlidesAdobe Lightroom Training Workshop Slides
Adobe Lightroom Training Workshop SlidesJohn Mauremootoo
 

Was ist angesagt? (20)

Question 6
Question 6 Question 6
Question 6
 
Jakub Dočkal, Alda Games
Jakub Dočkal, Alda GamesJakub Dočkal, Alda Games
Jakub Dočkal, Alda Games
 
Grade vi presentation and visual effects
Grade vi presentation and visual effectsGrade vi presentation and visual effects
Grade vi presentation and visual effects
 
Planning- Editing and software
Planning- Editing and software Planning- Editing and software
Planning- Editing and software
 
Lean video production software
Lean video production softwareLean video production software
Lean video production software
 
How to do a slideshow upload
How to do a slideshow uploadHow to do a slideshow upload
How to do a slideshow upload
 
Changing the Wordpress theme
Changing the Wordpress themeChanging the Wordpress theme
Changing the Wordpress theme
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web Design
 
Power point essentials
Power point essentialsPower point essentials
Power point essentials
 
PowerPoint - Quick Reminders
PowerPoint - Quick RemindersPowerPoint - Quick Reminders
PowerPoint - Quick Reminders
 
The metro design language for app developers
The metro design language for app developersThe metro design language for app developers
The metro design language for app developers
 
Exploring Microsoft Surface
Exploring Microsoft SurfaceExploring Microsoft Surface
Exploring Microsoft Surface
 
Equipment list
Equipment listEquipment list
Equipment list
 
Hb98908 midterm articulate powerpoint version
Hb98908 midterm articulate powerpoint versionHb98908 midterm articulate powerpoint version
Hb98908 midterm articulate powerpoint version
 
Infinity Blade and beyond
Infinity Blade and beyondInfinity Blade and beyond
Infinity Blade and beyond
 
SIUE IRIS Omeka Workshop
SIUE IRIS Omeka WorkshopSIUE IRIS Omeka Workshop
SIUE IRIS Omeka Workshop
 
Customizability in Design Systems
Customizability in Design SystemsCustomizability in Design Systems
Customizability in Design Systems
 
Wdes105 day 2
Wdes105 day 2Wdes105 day 2
Wdes105 day 2
 
Adobe Lightroom Training Workshop Slides
Adobe Lightroom Training Workshop SlidesAdobe Lightroom Training Workshop Slides
Adobe Lightroom Training Workshop Slides
 
Lightroom Overview
Lightroom OverviewLightroom Overview
Lightroom Overview
 

Ähnlich wie Building Websites for Retina Displays: Making Friends with Pixels

Great Responsive-ability Web Design
Great Responsive-ability Web DesignGreat Responsive-ability Web Design
Great Responsive-ability Web DesignMike Wilcox
 
Responsive websites. Toolbox
Responsive websites. ToolboxResponsive websites. Toolbox
Responsive websites. ToolboxWojtek Zając
 
Mobile Best Practices
Mobile Best PracticesMobile Best Practices
Mobile Best Practicesmintersam
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web DesignJulia Vi
 
A Holistic Approach to HTML5 Game Design & Development
A Holistic Approach to HTML5 Game Design & DevelopmentA Holistic Approach to HTML5 Game Design & Development
A Holistic Approach to HTML5 Game Design & DevelopmentKarl Bunyan
 
Responsive Web Design: Clever Tips and Techniques
Responsive Web Design: Clever Tips and TechniquesResponsive Web Design: Clever Tips and Techniques
Responsive Web Design: Clever Tips and TechniquesVitaly Friedman
 
The web standards gentleman: a matter of (evolving) standards)
The web standards gentleman: a matter of (evolving) standards)The web standards gentleman: a matter of (evolving) standards)
The web standards gentleman: a matter of (evolving) standards)Chris Mills
 
Html5 - the new kid on the block
Html5 - the new kid on the blockHtml5 - the new kid on the block
Html5 - the new kid on the blockMarian Borca
 
The Mobile Development Landscape
The Mobile Development LandscapeThe Mobile Development Landscape
The Mobile Development LandscapeAmbert Ho
 
Designing for mobile
Designing for mobileDesigning for mobile
Designing for mobileDee Sadler
 
Designing in the Browser - Mason Wendell, Drupaldelphia
Designing in the Browser - Mason Wendell, DrupaldelphiaDesigning in the Browser - Mason Wendell, Drupaldelphia
Designing in the Browser - Mason Wendell, Drupaldelphiacanarymason
 
Trendsetting: Web Design and Beyond
Trendsetting: Web Design and BeyondTrendsetting: Web Design and Beyond
Trendsetting: Web Design and BeyondAndy Stratton
 
Responsive Websites
Responsive WebsitesResponsive Websites
Responsive WebsitesJoe Seifi
 
Is the mobile web enabled or disabled by design?
Is the mobile web enabled or disabled by design?Is the mobile web enabled or disabled by design?
Is the mobile web enabled or disabled by design?Henny Swan
 
HTML5 on Mobile(For Designer)
HTML5 on Mobile(For Designer)HTML5 on Mobile(For Designer)
HTML5 on Mobile(For Designer)Adam Lu
 
Mobile Websites tips and tricks @HeartAndSole
Mobile Websites tips and tricks @HeartAndSoleMobile Websites tips and tricks @HeartAndSole
Mobile Websites tips and tricks @HeartAndSolefakedarren
 
Responsive Web Design tips and tricks.
Responsive Web Design tips and tricks.Responsive Web Design tips and tricks.
Responsive Web Design tips and tricks.GaziAhsan
 

Ähnlich wie Building Websites for Retina Displays: Making Friends with Pixels (20)

Simple mobile Websites
Simple mobile WebsitesSimple mobile Websites
Simple mobile Websites
 
Responsive Web Site Design
Responsive Web Site DesignResponsive Web Site Design
Responsive Web Site Design
 
Great Responsive-ability Web Design
Great Responsive-ability Web DesignGreat Responsive-ability Web Design
Great Responsive-ability Web Design
 
Responsive websites. Toolbox
Responsive websites. ToolboxResponsive websites. Toolbox
Responsive websites. Toolbox
 
Mobile Best Practices
Mobile Best PracticesMobile Best Practices
Mobile Best Practices
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web Design
 
A Holistic Approach to HTML5 Game Design & Development
A Holistic Approach to HTML5 Game Design & DevelopmentA Holistic Approach to HTML5 Game Design & Development
A Holistic Approach to HTML5 Game Design & Development
 
Responsive Web Design: Clever Tips and Techniques
Responsive Web Design: Clever Tips and TechniquesResponsive Web Design: Clever Tips and Techniques
Responsive Web Design: Clever Tips and Techniques
 
The web standards gentleman: a matter of (evolving) standards)
The web standards gentleman: a matter of (evolving) standards)The web standards gentleman: a matter of (evolving) standards)
The web standards gentleman: a matter of (evolving) standards)
 
Html5 - the new kid on the block
Html5 - the new kid on the blockHtml5 - the new kid on the block
Html5 - the new kid on the block
 
The Mobile Development Landscape
The Mobile Development LandscapeThe Mobile Development Landscape
The Mobile Development Landscape
 
CSS for Mobile
CSS for MobileCSS for Mobile
CSS for Mobile
 
Designing for mobile
Designing for mobileDesigning for mobile
Designing for mobile
 
Designing in the Browser - Mason Wendell, Drupaldelphia
Designing in the Browser - Mason Wendell, DrupaldelphiaDesigning in the Browser - Mason Wendell, Drupaldelphia
Designing in the Browser - Mason Wendell, Drupaldelphia
 
Trendsetting: Web Design and Beyond
Trendsetting: Web Design and BeyondTrendsetting: Web Design and Beyond
Trendsetting: Web Design and Beyond
 
Responsive Websites
Responsive WebsitesResponsive Websites
Responsive Websites
 
Is the mobile web enabled or disabled by design?
Is the mobile web enabled or disabled by design?Is the mobile web enabled or disabled by design?
Is the mobile web enabled or disabled by design?
 
HTML5 on Mobile(For Designer)
HTML5 on Mobile(For Designer)HTML5 on Mobile(For Designer)
HTML5 on Mobile(For Designer)
 
Mobile Websites tips and tricks @HeartAndSole
Mobile Websites tips and tricks @HeartAndSoleMobile Websites tips and tricks @HeartAndSole
Mobile Websites tips and tricks @HeartAndSole
 
Responsive Web Design tips and tricks.
Responsive Web Design tips and tricks.Responsive Web Design tips and tricks.
Responsive Web Design tips and tricks.
 

Kürzlich hochgeladen

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
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
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 

Kürzlich hochgeladen (20)

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
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
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 

Building Websites for Retina Displays: Making Friends with Pixels

  • 1. BUILDING WEBSITES FOR RETINA DISPLAYS: MAKING FRIENDS WITH PIXELS Shoshi Roberts @shoshizilla
  • 2. PIXEL PERFECTION, NOT JUST FOR APPS • Many devices have a 2x pixel density or higher (the iPhone 4 is among them) • Images that are not optimized for them will be blurry and sad • There is no automatic standard for including hi-res images BUT THERE ARE SOME SOLUTIONS...
  • 5. SHOW ME THE CODE!
  • 6. #1 - FLUID LAYOUT • First, use responsive or fluid design to create a page that looks great on all devices • Alternatively, make a mobile specific version of your site
  • 7. #2 - USE CSS3 • Really, as much as you like • Mobile browsers, especially webkit, are largely up to date and support the latest properties. • CSS3 for gradients, shadows, etc. will eliminate the need for using images in many cases • It improves performance! (like anything, when used in moderation)
  • 8. #3 - OPTIMIZE YOUR IMAGES • Make 2 versions: • One at normal size (e.g. 100px by 100px) • One at double size (e.g. 200px by 200px)
  • 9. #4A - WRITE MEDIA QUERIES h1.icon { width: 100px; height: 100px; /* This is your 100px by 100px image */ background: transparent url(icon.png) 0 0 no-repeat; } @media screen and (-webkit-min-device-pixel-ratio: 2) and (-o-min-device-pixel-ratio: 2) and (min--moz-device-pixel-ratio: 2) and (min-device-pixel-ratio: 2) { h1.icon { /* This is your 200px by 200px image */ background: transparent url(icon-2x.png) 0 0 no-repeat; -moz-background-size: 100px 100px; /* Firefox 3.6) */ -o-background-size: 100px 100px; /* Opera 9.5 */ -webkit-background-size: 100px 100px; /* Safari 3.0 */ background-size: 100px 100px; } }
  • 10. #4B - OR USE SVG HTML <object data="icon.svg" type="image/svg+xml" class="vector"> </object> CSS - Fluid .vector { /* Use whatever percentages you like, the content will scale */ width: 90%; height: 90%; }
  • 11. #5 - TEST, TEST, TEST! • Look at it on as many devices as you can. • Pay the most attention to the platforms your users visit on.
  • 12. WRAPPING IT UP • The arms race for pixel density is on, make images that scale • Use a CSS3 when you can • Use media queries and SVG to optimize your image display
  • 13. THANKS AND HAPPY HACKING! @shoshizilla for @ladieswhocode Special Thanks to @mintdigital for hosting