Skip to content

Instantly share code, notes, and snippets.

@benknight
Created May 30, 2014 07:09
Show Gist options
  • Save benknight/c0c49bd8288bbdf678b7 to your computer and use it in GitHub Desktop.
Save benknight/c0c49bd8288bbdf678b7 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.3.7)
// Compass (v1.0.0.alpha.18)
// ----
// Photo boxes with inset shadows
// Solves issue of "framed" user-uploaded photos
.showcase-photo-box,
.photo-box {
a:after {
content: "";
position: absolute;
display: block;
width: 100%;
height: 100%;
top: 0;
left: 0;
.photo-grid & {
content: normal;
}
}
}
.showcase-photo-box a:after {
box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.25);
}
.photo-box a {
display: block;
position: relative;
&:after {
border-radius: 4px;
box-shadow: inset 0 0 9px rgba(0, 0, 0, 0.5);
}
}
.showcase-photo-box a:after,
.photo-box a:after {
content: "";
position: absolute;
display: block;
width: 100%;
height: 100%;
top: 0;
left: 0;
}
.photo-grid .showcase-photo-box a:after, .photo-grid
.photo-box a:after {
content: normal;
}
.showcase-photo-box a:after {
box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.25);
}
.photo-box a {
display: block;
position: relative;
}
.photo-box a:after {
border-radius: 4px;
box-shadow: inset 0 0 9px rgba(0, 0, 0, 0.5);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment