Skip to content

Instantly share code, notes, and snippets.

@alexspeller
Created June 5, 2017 23:47
Show Gist options
  • Save alexspeller/52ad699cf39a9bd3664625f65b3ca16f to your computer and use it in GitHub Desktop.
Save alexspeller/52ad699cf39a9bd3664625f65b3ca16f to your computer and use it in GitHub Desktop.
New Twiddle
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
body {
margin: 12px 16px;
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-size: 12pt;
}
button {
background-color: red;
position: absolute;
top: 200px;
left: 200px;
z-index: 1;
}
button.noclick {
background-color: red;
position: absolute;
top: 240px;
left: 80px;
z-index: 1;
}
.mask {
position: absolute;
pointer-events: none;
top: 0;
left: 0;
bottom: 0;
right: 0;
width: 100%;
height: 100%;
z-index: 2;
}
.mask path {
pointer-events: initial;
width: 100%;
height: 100%;
}
<p>You can click the buttons that show through the mask. But you can't click the part of the button under the mask</p>
<button>Click</button>
<button class='noclick'>NO NO NO Click (under mask)</button>
<svg class='mask' xmlns="http://www.w3.org/2000/svg">
<path id="svg_1" d="m60,97c0,2 -6,244 -6,244c0,0 251,-5 251,-5c0,0 148,0 148,0c0,0 2,-143 2,-143c0,0 5,-112 5,-112c0,0 -188,1 -188,1c0,0 -1,93 -1,93c0,0 102,-1 102,-1c0,0 -2,94 -2,94c0,0 -253,1 -253,1c0,0 3,-91 3,-91c0,0 142,-3 142,-3c0,0 36,-7 36,-7c0,0 -4,-86 -4,-86c0,0 -235,13 -235,15z" stroke-width="1.5" stroke="#191919" fill="#000"/>
</svg>
{
"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",
"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