Skip to content

Commit

Permalink
Set left position for browsers that don't support transform3d
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew8xx8 committed Aug 5, 2015
1 parent 6f8cda4 commit d40b68f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/left-nav.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
const isBrowser = typeof window !== 'undefined';
let Modernizr = isBrowser ? require('./utils/modernizr.custom') : undefined;

let React = require('react');
let KeyCode = require('./utils/key-code');
let StylePropable = require('./mixins/style-propable');
Expand Down Expand Up @@ -101,7 +104,7 @@ let LeftNav = React.createClass({
width: this.getTheme().width,
position: 'fixed',
zIndex: 10,
left: 0,
left: Modernizr.csstransforms3d ? 0 : x,
top: 0,
transform: 'translate3d(' + x + 'px, 0, 0)',
transition: !this.state.swiping && Transitions.easeOut(),
Expand All @@ -123,6 +126,7 @@ let LeftNav = React.createClass({
right: 0,
},
};

styles.menuItemLink = this.mergeAndPrefix(styles.menuItem, {
display: 'block',
textDecoration: 'none',
Expand Down

0 comments on commit d40b68f

Please sign in to comment.