+ All Categories
Home > Documents > RefreshDC IE6 Presentation - Evan Samek

RefreshDC IE6 Presentation - Evan Samek

Date post: 07-Apr-2018
Category:
Upload: evan-samek
View: 228 times
Download: 0 times
Share this document with a friend

of 63

Transcript
  • 8/4/2019 RefreshDC IE6 Presentation - Evan Samek

    1/63

    Tales from the Internet Explorer Trenches

  • 8/4/2019 RefreshDC IE6 Presentation - Evan Samek

    2/63

    Tales from the Internet Explorer Trenches

    Who is this guy?

    @esamek

    Lead Designer

  • 8/4/2019 RefreshDC IE6 Presentation - Evan Samek

    3/63

    Tales from the Internet Explorer Trenches

    So about that IE6...

    It sucks

    Its old

    But two things to remember...

  • 8/4/2019 RefreshDC IE6 Presentation - Evan Samek

    4/63

    Tales from the Internet Explorer Trenches

    It was innovative at its time

    Makes great developer conversation

  • 8/4/2019 RefreshDC IE6 Presentation - Evan Samek

    5/63

    Tales from the Internet Explorer Trenches

    has to support it

    Fortune 500 companies

    Large companiesOlder demographic of users

  • 8/4/2019 RefreshDC IE6 Presentation - Evan Samek

    6/63

    Tales from the Internet Explorer Trenches

    Other companies have to support it too...

    The government

    Older demographicsDated IT departments

    Bureaucracies

  • 8/4/2019 RefreshDC IE6 Presentation - Evan Samek

    7/63

    Tales from the Internet Explorer Trenches

    Two parts to this presentation

    Pro-actively NOT support IE6 - FUN!

    Pro-actively support IE6 - NOT FUN!

  • 8/4/2019 RefreshDC IE6 Presentation - Evan Samek

    8/63

    Tales from the Internet Explorer Trenches

    Boss says - We dont have to

    support IE6!

    A few things we can do....

  • 8/4/2019 RefreshDC IE6 Presentation - Evan Samek

    9/63

    Tales from the Internet Explorer Trenches

    1. Disable ALL styles

    Conditionally EXCLUDE CSS

    Important to code HTMLcorrectly

    Could make user thinksomething is wrong with their

    browser

  • 8/4/2019 RefreshDC IE6 Presentation - Evan Samek

    10/63

    Tales from the Internet Explorer Trenches

  • 8/4/2019 RefreshDC IE6 Presentation - Evan Samek

    11/63

    Tales from the Internet Explorer Trenches

  • 8/4/2019 RefreshDC IE6 Presentation - Evan Samek

    12/63

    Tales from the Internet Explorer Trenches

    Disable ALL styles - Code

  • 8/4/2019 RefreshDC IE6 Presentation - Evan Samek

    13/63

    Tales from the Internet Explorer Trenches

    2. Display warning banner

    Leave errors alone

    At least we inform the userthat we dont support IE6

  • 8/4/2019 RefreshDC IE6 Presentation - Evan Samek

    14/63

    Tales from the Internet Explorer Trenches

    Display warning banner

  • 8/4/2019 RefreshDC IE6 Presentation - Evan Samek

    15/63

    Tales from the Internet Explorer Trenches

    3. Display restrictive Popup

    Doesnt even allow users to get in

    Can recommend other browsers orother methods to access the service

    Quite frustrating

    T l f h I E l T h

  • 8/4/2019 RefreshDC IE6 Presentation - Evan Samek

    16/63

    Tales from the Internet Explorer Trenches

    Display restrictive Popup

    T l f th I t t E l T h

  • 8/4/2019 RefreshDC IE6 Presentation - Evan Samek

    17/63

    Tales from the Internet Explorer Trenches

    4. Google Chrome Frame

    Amazing

    Makes IE6+ = Chrome (Webkit)Replaces entire rendering engine, JS& CSS

    T l f th I t t E l T h

  • 8/4/2019 RefreshDC IE6 Presentation - Evan Samek

    18/63

    Tales from the Internet Explorer Trenches

    4. Google Chrome Frame Problems

    Typically requires Admin access

    IT departments frown on itUser has to install, could harmconversion rate

    T l f th I t t E l T h

  • 8/4/2019 RefreshDC IE6 Presentation - Evan Samek

    19/63

    Tales from the Internet Explorer Trenches

    Google Chrome Frame Non - Admin

    Got around admin access

    First tries to install Admin req.version, then falls back to non-admin

    Tales from the Internet E plorer Trenches

  • 8/4/2019 RefreshDC IE6 Presentation - Evan Samek

    20/63

    Tales from the Internet Explorer Trenches

    Google Chrome Frame Usage

  • 8/4/2019 RefreshDC IE6 Presentation - Evan Samek

    21/63

    Tales from the Internet Explorer Trenches

    Google Chrome Frame Usage

    /*

    CSS rules to use for styling the overlay:

    .chromeFrameOverlayContent

    .chromeFrameOverlayContent iframe

    .chromeFrameOverlayCloseBar

    .chromeFrameOverlayUnderlay

    */

    // You may want to place these lines inside an onload handler

    CFInstall.check({

    mode: "overlay",

    destination: "http://www.waikiki.com"

    });

    Add JavaScript

    Tales from the Internet Explorer Trenches

    http://www.waikiki.com/http://www.waikiki.com/http://ajax.googleapis.com/ajax/libs/chrome-frame/1/CFInstall.min.jshttp://ajax.googleapis.com/ajax/libs/chrome-frame/1/CFInstall.min.js
  • 8/4/2019 RefreshDC IE6 Presentation - Evan Samek

    22/63

    Tales from the Internet Explorer Trenches

    Google Chrome Frame Default Popup

    Tales from the Internet Explorer Trenches

  • 8/4/2019 RefreshDC IE6 Presentation - Evan Samek

    23/63

    Tales from the Internet Explorer Trenches

    Google Chrome Frame Example

    Tales from the Internet Explorer Trenches

  • 8/4/2019 RefreshDC IE6 Presentation - Evan Samek

    24/63

    Tales from the Internet Explorer Trenches

    5. Kill/Crash IE6

    We can, for fun, crash IE6 with thefollowing code:

    *{position:relative}

  • 8/4/2019 RefreshDC IE6 Presentation - Evan Samek

    25/63

    p

    Boss says - We DO have to

    support IE6!Well...crap.

    But we can do it.

    Tales from the Internet Explorer Trenches

  • 8/4/2019 RefreshDC IE6 Presentation - Evan Samek

    26/63

    p

    Strategies/Things to keep in mind

    Always code for modern browsers, butkeep Graceful Degradation in mind

    Always ask yourself if this will work in IE6

    There is always a way to fix IE6 displayissues

    It may just take time

    Tales from the Internet Explorer Trenches

  • 8/4/2019 RefreshDC IE6 Presentation - Evan Samek

    27/63

    p

    Strategies/Things to keep in mind

    Graceful Degradation and Progressive Enhancement

    Tales from the Internet Explorer Trenches

  • 8/4/2019 RefreshDC IE6 Presentation - Evan Samek

    28/63

    p

    Graceful Degradation

    first build for the latest and greate

    then add handlers for less capabledevices.

    HomeProducts

    Services

    .box {box-shadow:0 0 3px #444;}

    .ie6 .box {border:1px solid #444;}

    Tales from the Internet Explorer Trenches

  • 8/4/2019 RefreshDC IE6 Presentation - Evan Samek

    29/63

    Progressive Enhancement

    begin with the basic version, th

    add enhancements for those whocan handle them.

    .box {border:1px solid #444;}

    .chrome .box {box-shadow:0 0 3px #444;border:none;}

    Tales from the Internet Explorer Trenches

  • 8/4/2019 RefreshDC IE6 Presentation - Evan Samek

    30/63

    The setup - HTML

    Use conditional comments toinclude relevant CSS

    According to the conditional comment this is n

    Tales from the Internet Explorer Trenches

  • 8/4/2019 RefreshDC IE6 Presentation - Evan Samek

    31/63

    The setup - HTML

    Use conditional comments to

    include relevant CSS

    Ordering is important forCascading

    !! ! !

    Tales from the Internet Explorer Trenches

  • 8/4/2019 RefreshDC IE6 Presentation - Evan Samek

    32/63

    A quick note about Browser Sniffers

    OK, but has some drawbacks

    Mixed CSS

    Performance loss

    .msie6 .something {color:#fff}

    .firefox4 .something {color:#f3f3

    Tales from the Internet Explorer Trenches/* http://meyerweb.com/eric/tools/css/reset/

    2 0 | 20110126

    http://meyerweb.com/eric/tools/css/reset/http://meyerweb.com/eric/tools/css/reset/
  • 8/4/2019 RefreshDC IE6 Presentation - Evan Samek

    33/63

    The setup - CSS

    Browsers have default styles

    Always start with CSS Reset

    v2.0 | 20110126License: none (public domain)

    */

    html, body, div, span, applet, object, iframe,h1, h2, h3, h4, h5, h6, p, blockquote, pre,a, abbr, acronym, address, big, cite, code,del, dfn, em, img, ins, kbd, q, s, samp,small, strike, strong, sub, sup, tt, var,b, u, i, center,dl, dt, dd, ol, ul, li,fieldset, form, label, legend,table, caption, tbody, tfoot, thead, tr, th, tdarticle, aside, canvas, details, embed,figure, figcaption, footer, header, hgroup,menu, nav, output, ruby, section, summary,time, mark, audio, video {! margin: 0;! padding: 0;! border: 0;! font-size: 100%;! font: inherit;! vertical-align: baseline;}/* HTML5 display-role reset for older browsers article, aside, details, figcaption, figure,

    footer, header, hgroup, menu, nav, section {! display: block;}body {! line-height: 1;}ol, ul {! list-style: none;}blockquote, q {! quotes: none;}blockquote:before, blockquote:after,q:before, q:after {! content: '';! content: none;}table {! border-collapse: collapse;! border-spacing: 0;}

    Tales from the Internet Explorer Trenches

  • 8/4/2019 RefreshDC IE6 Presentation - Evan Samek

    34/63

    The setup - No need for CSS hacks

    Cascade styles, dont use hacks

    Cleaner code

    Its called CSS for a reason!

    Tales from the Internet Explorer Trenches

  • 8/4/2019 RefreshDC IE6 Presentation - Evan Samek

    35/63

    How to implement a fix

    Find affected element

    Copy element selectorPaste into IE CSS

    Change relevant styles

    IN STYLE.CSS (Base Style)

    #content .sidebar .nav {box-shadow: 0 0 3px #444;border

    IN IE6.CSS (IE Fix Style)

    #content .sidebar .nav {border:2px solid #444;}

    Tales from the Internet Explorer Trenches

  • 8/4/2019 RefreshDC IE6 Presentation - Evan Samek

    36/63

    How to figure out whats wrong

    Need IE6

    Need a firebug equivalent

    Tales from the Internet Explorer Trenches

  • 8/4/2019 RefreshDC IE6 Presentation - Evan Samek

    37/63

    How to figure out whats wrong

    In order to get IE6, you needWindows XP.

    There are ways to get it still...

    Tales from the Internet Explorer Trenches

  • 8/4/2019 RefreshDC IE6 Presentation - Evan Samek

    38/63

    How to get IE6

    Windows 7 -> WinXP Mode

    Tales from the Internet Explorer Trenches

  • 8/4/2019 RefreshDC IE6 Presentation - Evan Samek

    39/63

    How to get IE6

    Windows Vista -> IETester

    Tales from the Internet Explorer Trenches

  • 8/4/2019 RefreshDC IE6 Presentation - Evan Samek

    40/63

    How to get IE6

    Virtual Machines

    I have found displaydifferences

    Slow

    Tales from the Internet Explorer Trenches

  • 8/4/2019 RefreshDC IE6 Presentation - Evan Samek

    41/63

    Best Way to get IE6:

    Install Windows XPStandalone Machine

    Tales from the Internet Explorer Trenches

  • 8/4/2019 RefreshDC IE6 Presentation - Evan Samek

    42/63

    How to get a Firebug for IE6

    MSFT Developer Toolbar

    Tales from the Internet Explorer Trenches

  • 8/4/2019 RefreshDC IE6 Presentation - Evan Samek

    43/63

    MSFT Developer Toolbar

    Tales from the Internet Explorer Trenches

  • 8/4/2019 RefreshDC IE6 Presentation - Evan Samek

    44/63

    Most common (weird) problem

    hasLayout

    Tales from the Internet Explorer Trenches

  • 8/4/2019 RefreshDC IE6 Presentation - Evan Samek

    45/63

    hasLayout Bug

    Layout is an IE/Win proprietary concept that determines howelements draw and bound their content, interact with and relate to other

    elements, and react on and transmit application/user events.

    Often a lack of dimensions applied

    You can see whether an element hasLayout in the IE DeveloperToolbar

    -1 actually equals TRUE?!?!

    Tales from the Internet Explorer Trenches

  • 8/4/2019 RefreshDC IE6 Presentation - Evan Samek

    46/63

    Elements that have layout by default

    , , , , , , , , , , , ,

    not !

    Tales from the Internet Explorer Trenches

  • 8/4/2019 RefreshDC IE6 Presentation - Evan Samek

    47/63

    How to fix hasLayout

    apply dimension settingproperties to affected element

    and its parents

    use debug bar to see effect

    position: absolute

    float: left|right

    display: inline-block

    width: any value other than 'auto

    height: any value other than 'aut

    zoom: any value other than'normal' (MSDN)

    writing-mode: tb-rl (MSDN)

    Tales from the Internet Explorer Trenches

    http://msdn.microsoft.com/en-us/library/ms531187.aspxhttp://msdn.microsoft.com/en-us/library/ms531187.aspxhttp://msdn.microsoft.com/en-us/library/ms531189.aspxhttp://msdn.microsoft.com/en-us/library/ms531189.aspx
  • 8/4/2019 RefreshDC IE6 Presentation - Evan Samek

    48/63

    What IE6 doesnt support

    CSS3 properties

    Some CSS2 properties

    CSS3 Advanced Selectors

    Some advanced CSS2 properties

    Transparency

    :hover on anything besides s

    Web Fonts

    box-shadow

    border-radius

    min-height, min-width rgba

    opacity .content.main-content

    .link[src=*.jpg] div:hover

    Web Fonts

    Tales from the Internet Explorer Trenches

  • 8/4/2019 RefreshDC IE6 Presentation - Evan Samek

    49/63

    jQuery!! - Graceful Degradation (kinda)

    Use JavaScript to select and apply classnames to elements dynamically

    jQuery is by far and away the best way

    get around IE6 advanced selectorlimitations.

    STILL WORKS IN IE6!!!

    $(".content.main-content").css("border","9px solid re

    $(".link[src=*.jpg]").css("border","9px solid red");

    Tales from the Internet Explorer Trenches

  • 8/4/2019 RefreshDC IE6 Presentation - Evan Samek

    50/63

    What jQuery can help with

    Hovering on elements that arent s

    Advanced selectors

    $("li").hover( function () { $(this).addClass(hover-on); },function () {

    $(this).removeClass(hover-on); }

    );

    STILL WORKS IN IE6!!!

    $(".item:nth-child(odd)").css("border","9px solid re

    $(".link[src=*.jpg]").css("border","9px solid red");

    Tales from the Internet Explorer Trenches

  • 8/4/2019 RefreshDC IE6 Presentation - Evan Samek

    51/63

    CSS Expressions

    Javascript within CSS

    Evaluates JS available properties to return a value to apply via CSS

    Only in IEs

    height: expression( this.scrollHeight > 332 ? "333px" : "auto" ); /* sets max-height for IE *

    Tales from the Internet Explorer Trenches

  • 8/4/2019 RefreshDC IE6 Presentation - Evan Samek

    52/63

    CSS Expressions Issues

    TRY TO AVOID!

    Performance loss

    Not only are they evaluated when the page is rendered and resized, but

    also when the page is scrolled and even when the user moves the mouseover the page.

    height: expression( this.scrollHeight > 332 ? "333px" : "auto" ); /* sets max-height for IE *

    Tales from the Internet Explorer Trenches

  • 8/4/2019 RefreshDC IE6 Presentation - Evan Samek

    53/63

    Transparency

    IE6 doesnt support PNG24s, no supportfor alpha channel

    PNG8 & GIF - pixel by pixeltransparency

    Tales from the Internet Explorer Trenches

  • 8/4/2019 RefreshDC IE6 Presentation - Evan Samek

    54/63

    Transparency Fixes

    Just use GIF or PNG8 with proper matte

    Use AlphaImageLoader - performance loss,

    messes with DOM, no repeats or positioning ofbackground IMGs - invalid CSS

    Lots of other proprietary PNG fixers out there

    Best solution (best looking) is PNG8s with carefulgraphic creation practices

    img {

    filter:

    progid:DXImageTransform.Microsoft.AlphaImageLoader(..

    }

    Tales from the Internet Explorer Trenches

  • 8/4/2019 RefreshDC IE6 Presentation - Evan Samek

    55/63

    Transparency Fix with PNG8

    Tales from the Internet Explorer Trenches

  • 8/4/2019 RefreshDC IE6 Presentation - Evan Samek

    56/63

    Web Fonts

    Just disable with conditional comments

    Windows does not have a good trackrecord of font smoothing/anti-aliasing

    Even TypeKit looks bad. Cufon and Sifrare flash solutions which look better butmake elements invisible to CSS.

    Tales from the Internet Explorer Trenches

  • 8/4/2019 RefreshDC IE6 Presentation - Evan Samek

    57/63

    IE Filter Property = Crappy CSS3

    Most people overlook the IE Filterproperty, its pretty powerful for what it is.

    Not valid CSS, so watch out.

    Box ShadowTransparencyBlurGlow

    WaveFlipChromaGradients

    filter: progid:DXImageTransform.Microsoft.Gradient(StartColorStr='#FFFFFF', EndColorStr='#000000);

    Tales from the Internet Explorer Trenches

  • 8/4/2019 RefreshDC IE6 Presentation - Evan Samek

    58/63

    IE Drop Shadow / Shadow

    filter: progid:DXImageTransform.Microsoft.DropShadow(OffX=5, OffY=5, Color=#ff0000);

    filter: progid:DXImageTransform.Microsoft.Shadow(Color=#cccccc, Strength=5, Direction=0),

    progid:DXImageTransform.Microsoft.Shadow(Color=#cccccc, Strength=5, Direction=90),

    progid:DXImageTransform.Microsoft.Shadow(Color=#cccccc, Strength=5, Direction=180),

    progid:DXImageTransform.Microsoft.Shadow(Color=#cccccc, Strength=5, Direction=270);

    Tales from the Internet Explorer Trenches

  • 8/4/2019 RefreshDC IE6 Presentation - Evan Samek

    59/63

    IE Transparency

    filter: Alpha(Opacity=80);

    Tales from the Internet Explorer Trenches

  • 8/4/2019 RefreshDC IE6 Presentation - Evan Samek

    60/63

    IE Blur

    progid:DXImageTransform.Microsoft.MotionBlur(strength=13, direction=310)progid:DXImageTransform.Microsoft.Blur(pixelradius=2)

    Tales from the Internet Explorer Trenches

  • 8/4/2019 RefreshDC IE6 Presentation - Evan Samek

    61/63

    IE Glow

    FILTER: Glow(Color=#ff0000, Strength=8);

    Tales from the Internet Explorer Trenches

  • 8/4/2019 RefreshDC IE6 Presentation - Evan Samek

    62/63

    IE Flip

    FILTER: FlipV;FILTER: FlipH;

    Tales from the Internet Explorer Trenches

  • 8/4/2019 RefreshDC IE6 Presentation - Evan Samek

    63/63

    IE Gradients

    filter:progid:DXImageTransform.Microsoft.Gradient(StartColorStr='#FFFFFF',EndColorStr='#000000);


Recommended