Skip to content

Instantly share code, notes, and snippets.

@rummik
Last active August 29, 2015 13:59
Show Gist options
  • Save rummik/10706913 to your computer and use it in GitHub Desktop.
Save rummik/10706913 to your computer and use it in GitHub Desktop.
Shadowy Zen Thing
/**
* Shadowy Zen Thing
*/
body {
background: #fafafa;
}
.soup {
-webkit-column-count: 2;
}
article {
width: calc(100% - 6px);
min-height: 60px;
margin: 3px;
display: inline-block;
background: #fff;
position: relative;
box-shadow: 0 0 3px rgba(0, 0, 0, .25),
0 0 0 2px rgba(0, 0, 0, 0) inset;
border-radius: 2px;
transition: .2s linear;
transition-property: box-shadow;
}
article:hover {
box-shadow: 0 0 3px rgba(0, 0, 0, .25),
0 0 0 2px rgba(0, 255, 0, .3) inset;
}
/* our shadow */
article:before {
content: '';
position: absolute;
top: -3px;
left: -3px;
right: -3px;
bottom: -5px;
z-index: -1;
opacity: .2;
background: -webkit-radial-gradient(bottom, #000, transparent 70%) no-repeat,
-webkit-radial-gradient(left, #000, transparent 62%) 100% no-repeat,
-webkit-radial-gradient(top, #000, transparent 70%) 0 100% no-repeat,
-webkit-radial-gradient(right, #000, transparent 62%) no-repeat;
background-size: 100% 3px, 3px 100%, 100% 5px, 3px 100%;
}
<div class="soup">
<article></article>
<article></article>
<article></article>
<article></article>
<article></article>
<article></article>
<article></article>
<article></article>
<article></article>
<article></article>
</div>
// alert('Hello world!');
{"view":"split-vertical","fontsize":"70","seethrough":"","prefixfree":"1","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment