Last active
September 11, 2017 09:27
-
-
Save hoodwink73/5e3d70773a3ef91855fbd7f506fa69bc to your computer and use it in GitHub Desktop.
New Twiddle
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
didRender () { | |
this._super(...arguments); | |
console.log(this.$('.antiscroll-wrap')) | |
this.$('.antiscroll-wrap').antiscroll({ | |
autoHide: false | |
}); | |
} | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle' | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { | |
margin: 12px 16px; | |
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; | |
font-size: 12pt; | |
} | |
.container { | |
height: 300px; | |
} | |
/* | |
* Antiscroll: cross-browser native OS X Lion scrollbars | |
* https://github.com/Automattic/antiscroll | |
* v0.9 | |
*/ | |
.antiscroll-wrap { | |
display: inline-block; | |
position: relative; | |
overflow: hidden; | |
} | |
.antiscroll-scrollbar { | |
background: gray; | |
background: rgba(0, 0, 0, 0.5); | |
-webkit-border-radius: 7px; | |
-moz-border-radius: 7px; | |
border-radius: 7px; | |
-webkit-box-shadow: 0 0 1px #fff; | |
-moz-box-shadow: 0 0 1px #fff; | |
box-shadow: 0 0 1px #fff; | |
position: absolute; | |
opacity: 0; | |
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0); | |
-webkit-transition: linear 300ms opacity; | |
-moz-transition: linear 300ms opacity; | |
-o-transition: linear 300ms opacity; | |
} | |
.antiscroll-scrollbar-shown { | |
opacity: 1; | |
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100); | |
} | |
.antiscroll-scrollbar-horizontal { | |
height: 7px; | |
margin-left: 2px; | |
bottom: 2px; | |
left: 0; | |
} | |
.antiscroll-scrollbar-vertical { | |
width: 7px; | |
margin-top: 2px; | |
right: 2px; | |
top: 0; | |
} | |
.antiscroll-inner { | |
overflow: scroll; | |
} | |
/** A bug in Chrome 25 on Lion requires each selector to have their own | |
blocks. E.g. the following: | |
.antiscroll-inner::-webkit-scrollbar, .antiscroll-inner::scrollbar {...} | |
causes the width and height rules to be ignored by the browser resulting | |
in both native and antiscroll scrollbars appearing at the same time. | |
*/ | |
.antiscroll-inner::-webkit-scrollbar { | |
width: 0; | |
height: 0; | |
} | |
.antiscroll-inner::scrollbar { | |
width: 0; | |
height: 0; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "0.12.1", | |
"EmberENV": { | |
"FEATURES": {} | |
}, | |
"options": { | |
"use_pods": false, | |
"enable-testing": false | |
}, | |
"dependencies": { | |
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js", | |
"ember": "2.12.0", | |
"ember-template-compiler": "2.12.0", | |
"antiscroll": "https://cdnjs.cloudflare.com/ajax/libs/antiscroll/0.9/antiscroll.min.js", | |
"ember-testing": "2.12.0" | |
}, | |
"addons": { | |
"ember-data": "2.12.1" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment