Skip to content

Instantly share code, notes, and snippets.

Gradient shadow in pure CSS

alt text

HTML
<button>Let's Go !</button>
@b4z81
b4z81 / LICENCE SUBLIME TEXT
Created January 12, 2017 10:18
Sublime Text 3 Serial key build is 3103
—– BEGIN LICENSE —–
Michael Barnes
Single User License
EA7E-821385
8A353C41 872A0D5C DF9B2950 AFF6F667
C458EA6D 8EA3C286 98D1D650 131A97AB
AA919AEC EF20E143 B361B1E7 4C8B7F04
B085E65E 2F5F5360 8489D422 FB8FC1AA
93F6323C FD7F7544 3F39C318 D95E6480
FCCC7561 8A4A1741 68FA4223 ADCEDE07
@b4z81
b4z81 / picture.html
Last active October 25, 2016 16:53
responsive images
<picture>
<source srcset="extralarge.jpg" media="(min-width: 1000px)">
<source srcset="large.jpg" media="(min-width: 800px)">
<img srcset="medium.jpg" alt="…">
</picture>
myApp.config(['$compileProvider', function ($compileProvider) {
$compileProvider.debugInfoEnabled(false);
}]);
var battery = navigator.battery || navigator.webkitBattery || navigator.mozBattery || navigator.msBattery;
if (battery) {
// battery API supported
}
// enable vibration support
navigator.vibrate = navigator.vibrate || navigator.webkitVibrate || navigator.mozVibrate || navigator.msVibrate;
if (navigator.vibrate) {
// vibration API supported
// vibrate for one second
navigator.vibrate(1000);
}
@b4z81
b4z81 / vendor-prefix.scss
Created December 11, 2013 15:34
vendor prefixing
@mixin vendorize($property, $value) {
-webkit-#{$property}: $value;
-moz-#{$property}: $value;
-ms-#{$property}: $value;
-o-#{$property}: $value;
#{$property}: $value;
}
/*
1- Horizontally and vertically
Dynamic sized elements
*/
.parent { position: relative; }
.child {
@mixin clear() {
&:before, &:after {
content: "\0020";
display: block;
height: 0;
overflow: hidden;
}
&:after {
clear: both;
}
@mixin linkTextOffscreen() {
text-indent: -9999px;
overflow: hidden;
text-decoration: none;
display: block;
font-size: 0;
text-align: start;
}