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);
}]);
@b4z81
b4z81 / 4 cubes → 12 small pyramids → 3 big pyramids.markdown
Created August 28, 2015 13:15
4 cubes → 12 small pyramids → 3 big pyramids

4 cubes → 12 small pyramids → 3 big pyramids

Pure CSS. Uses transform-style: preserve-3d, so it won't work in IE up to and including 11. Should work in the new Edge browser, but not actually tested. Tested & works for the most part in Firefox 39, 42 (nightly), Chrome 44, 46 (canary)/ Opera 31 beta on Windows 8. Firefox has 3D ordering issues, Chrome shows lines between parts. Update: Safari works the same as Chrome, while Edge seems to have a problem when combining into cubes (same as Firefox?) - see replies here. Inspiration:

gif

Forked from Ana Tudor's Pen 4 cubes → 12 small pyramids → 3 big pyramids.

A Pen by Stefano Guglielmi on CodePen.

@b4z81
b4z81 / Don't Overthink It Grids.markdown
Created August 28, 2015 13:10
Don't Overthink It Grids
@b4z81
b4z81 / Mixing vw and vh in font-size.markdown
Last active August 28, 2015 10:10
text that always fills the viewport

Mixing vw and vh in font-size

To create text that always fill the viewport, no matter what ratio. This is just a concept and not very well tested ;-)

A Pen by CrocoDillon on CodePen.

License.

/*
* Normalized hide address bar for iOS & Android
* (c) Scott Jehl, scottjehl.com
* MIT License
*/
(function( win ){
var doc = win.document;
// If there's a hash, or addEventListener is undefined, stop here
if( !location.hash && win.addEventListener ){
h1 {
font-size: 72px;
background: -webkit-linear-gradient(#eee, #333);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}