Skip to content

Instantly share code, notes, and snippets.

@akoebbe
Last active May 31, 2019 14:51
Show Gist options
  • Save akoebbe/218f17e1591ebf15e359 to your computer and use it in GitHub Desktop.
Save akoebbe/218f17e1591ebf15e359 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
> 1%
last 2 versions
<div class="shiny">Here's some copy</div>
// ----
// libsass (v3.5.4)
// ----
@mixin glassify($color) {
$bright: lighten($color, 10);
color: black;
@if lightness($color) < 25 {
$bright: lighten($color, 25);
}
@if lightness($color) < 50 {
color: white;
}
background-image: linear-gradient(darken($bright, 15), $bright 50%, darken($color, 15) 51%, $color);
border-top: solid 1px lighten($color, 10);
border-bottom: solid 1px darken($color, 10);
border-radius: 1em;
box-shadow: 0 5px 10px darken($color, 40);
}
.shiny {
@include glassify(#ff77ff);
width: 300px;
padding: 1em;
margin: 5em auto;
text-align: center;
}
.shiny {
color: black;
background-image: -webkit-linear-gradient(#ff5eff, #ffaaff 50%, #ff2bff 51%, #ff77ff);
background-image: linear-gradient(#ff5eff, #ffaaff 50%, #ff2bff 51%, #ff77ff);
border-top: solid 1px #ffaaff;
border-bottom: solid 1px #ff44ff;
border-radius: 1em;
box-shadow: 0 5px 10px #aa00aa;
width: 300px;
padding: 1em;
margin: 5em auto;
text-align: center;
}
<div class="shiny">Here's some copy</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment