Skip to content

Instantly share code, notes, and snippets.

@jedfoster
Forked from SassMeister/index.markdown
Last active September 2, 2020 17:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jedfoster/f50c69d009f7ae45ee2f8597ce16c1b3 to your computer and use it in GitHub Desktop.
Save jedfoster/f50c69d009f7ae45ee2f8597ce16c1b3 to your computer and use it in GitHub Desktop.

#3D Text in Sass

Inspired by @mdo

<p>#3D Text in Sass</p>
<p>Inspired by <a href="http://markdotto.com/playground/3d-text/">@mdo</a></p>
{
"sass": {
"compiler": "dart-sass/1.26.10",
"extensions": {},
"syntax": "SCSS",
"outputStyle": "expanded"
},
"autoprefixer": false
}
// @import "compass";
@mixin threeDtext($color, $depth, $harshess: 1%) {
$all: ();
@for $i from 0 through $depth {
$all: append($all, append(0 ($i * 1px) 0, darken($color, $i * $harshess)), comma);
}
text-shadow: $all;
}
h1 {
@include threeDtext(#CC9F9D, 8, 3);
font-size: 72px;
}
h1, p, a {
color: #FFF5F5;
font-family: Futura, sans-serif;
text-align: center;
text-transform: uppercase;
border: none;
outline: none;
}
html {
height: 100%;
@include background(linear-gradient(top, #C9231A, #940A03));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment