Skip to content

Instantly share code, notes, and snippets.

@tylersticka
Created July 19, 2013 22:03
Show Gist options
  • Select an option

  • Save tylersticka/6042662 to your computer and use it in GitHub Desktop.

Select an option

Save tylersticka/6042662 to your computer and use it in GitHub Desktop.

Revisions

  1. tylersticka created this gist Jul 19, 2013.
    17 changes: 17 additions & 0 deletions scrollable.scss
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,17 @@
    // Native scrolling (iOS 5+, Android 4+)
    .scrollable {
    overflow: auto; // Fallback for non-touch browsers
    -webkit-overflow-scrolling: touch; // Native-esque scrolling on touch-enabled webkit

    // Everything below here improves performance of scrolling. You can omit this at
    // first and add as your content becomes more complex and performance needs a boost.

    &, > * {
    -webkit-backface-visibility: hidden;
    }

    > * {
    position: relative;
    @include translate3d(0,0,0);
    }
    }