Skip to content

Instantly share code, notes, and snippets.

@jackiewu
Created August 1, 2015 04:11
Show Gist options
  • Save jackiewu/7f39e7baabf736c5711f to your computer and use it in GitHub Desktop.
Save jackiewu/7f39e7baabf736c5711f to your computer and use it in GitHub Desktop.
Material Playing Cards
// Suit Mixin
mixin suit(type, color, dimension)
if color == 'black'
- var color = '#363636'
if color == 'red'
- var color = '#d64c4c';
- var width = '100%';
- var height = '100%';
if type == 'Spade'
if dimension == 'true'
- var width = '37px'
- var height = '39px'
svg(version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/" x="0px" y="0px" width="#{width}" height="#{height}" viewBox="0 0 18.6 19.5" enable-background="new 0 0 18.6 19.5" xml:space="preserve")
g
<path fill="#{color}" d="M17.2,9.5L17.2,9.5L9.3,0l-8,9.5h0c-0.8,0.8-1.3,2-1.3,3.3c0,2.6,2.1,4.6,4.6,4.6c2.5,0,4.6-2.1,4.6-4.6h0 c0,2.5,2.1,4.6,4.6,4.6c2.6,0,4.6-2.1,4.6-4.6C18.6,11.4,18,10.3,17.2,9.5z"/>
<polygon fill="#{color}" points="6.8,19.5 11.8,19.5 9.3,15.1"/>
else if type == 'Heart'
if dimension == 'true'
- var width = '36px'
- var height = '34px'
svg(version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/" x="0px" y="0px" width="#{width}" height="#{height}" viewBox="0 0 18.2 17" enable-background="new 0 0 18.2 17" xml:space="preserve")
<path fill="#{color}" d="M18.2,4.5c0-2.5-2-4.5-4.5-4.5c-2.5,0-4.5,2-4.5,4.5h0C9.1,2,7,0,4.5,0C2,0,0,2,0,4.5 c0,1.2,0.5,2.4,1.3,3.2h0L9.1,17l7.8-9.3h0C17.7,6.9,18.2,5.8,18.2,4.5z"/>
else if type == 'Diamond'
if dimension == 'true'
- var width = '37px'
- var height = '44px'
svg(version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/" x="0px" y="0px" width="#{width}" height="#{height}" viewBox="0 0 18.2 21.7" enable-background="new 0 0 18.2 21.7" xml:space="preserve")
g
<polygon fill="#{color}" points="9.1,0 0,10.8 9.1,21.7 18.2,10.8"/>
else if type == 'Club'
if dimension == 'true'
- var width = '36px'
- var height = '37px'
svg(version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/" x="0px" y="0px" width="#{width}" height="#{height}" viewBox="0 0 18.2 19.1" enable-background="new 0 0 18.2 19.1" xml:space="preserve")
g
<path fill="#{color}" d="M13.6,7.7c-0.6,0-1.2,0.1-1.7,0.3c1.1-0.8,1.7-2.1,1.7-3.6c0-2.5-2-4.5-4.5-4.5S4.5,2,4.5,4.5 c0,1.4,0.7,2.7,1.7,3.6C5.7,7.9,5.2,7.7,4.5,7.7C2,7.7,0,9.8,0,12.3s2,4.5,4.5,4.5s4.5-2,4.5-4.5c0,0,0,0,0,0l0,0l0,0c0,0,0,0,0,0 c0,2.5,2,4.5,4.5,4.5c2.5,0,4.5-2,4.5-4.5S16.1,7.7,13.6,7.7z"/>
<polygon fill="#{color}" points="6.6,19.1 11.6,19.1 9.1,14.7"/>
mixin royal(type, color)
if type == 'Jack'
if color == 'red'
- var colorOne = '#d74b4c'
- var colorTwo = '#c84145'
else
- var colorOne = '#0c79bc';
- var colorTwo = '#025490';
svg(version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/" x="0px" y="0px" width="113px" height="52px" viewBox="0 0 56.5 27.7" enable-background="new 0 0 56.5 27.7" xml:space="preserve")
g
<rect id="XMLID_5_" x="34.7" y="9.7" fill="#E55125" width="9.1" height="4"/>
<rect id="XMLID_4_" x="12.9" y="9.7" fill="#F57E20" width="9.1" height="4"/>
<polygon id="XMLID_3_" fill="#FEBB18" points="28.2,27.7 28.2,0 21.3,2 21.3,13.4 15,13.2 12.9,5.7 0,5.7 5.6,27.7"/>
<polygon id="XMLID_2_" fill="#F49221" points="28.2,27.7 28.2,0 35.2,2 35.2,13.4 41.4,13.2 43.5,5.7 56.5,5.7 50.8,27.7"/>
<polygon fill="#{colorOne}" points="3.1,17.9 4.5,23.4 28.2,23.4 28.2,17.9"/>
<polygon fill="#{colorTwo}" points="53.3,17.9 51.9,23.4 28.2,23.4 28.2,17.9"/>
else if type == 'Queen'
if color == 'red'
- var colorOne = '#F59090'
- var colorTwo = '#F37B7B'
- var colorThree = '#EB5451'
- var colorFour = '#e43532'
- var colorFive = '#F15753'
- var colorSix = '#E14E4B'
- var colorSeven = '#A81F23'
- var colorEight = '#B62026'
else
- var colorOne = '#7DA3D5'
- var colorTwo = '#6795CE'
- var colorThree = '#3480C3'
- var colorFour = '#0075BC'
- var colorFive = '#3C82C4'
- var colorSix = '#0A79BF'
- var colorSeven = '#005490'
- var colorEight = '#005A9A'
svg(version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/" x="0px" y="0px" width="123px" height="75px" viewBox="0 0 61.1 37.2" enable-background="new 0 0 61.1 37.2" xml:space="preserve")
<polygon id="XMLID_16_" fill="#E55125" points="46.8,23 42.5,17 61.1,3.7"/>
<polygon id="XMLID_15_" fill="#F57E20" points="14.4,23 0,3.7 18.6,17"/>
<polygon id="XMLID_14_" fill="#FEBB18" points="8.8,37.2 0,3.7 14.4,23 30.6,0 30.6,37.2"/>
<polygon id="XMLID_13_" fill="#F49221" points="52.3,37.2 61.1,3.7 46.8,23 30.6,0 30.6,37.2"/>
g
<polygon id="XMLID_12_" fill="#{colorFive}" points="30.6,23 23.9,23 27.2,27.9"/>
<polygon id="XMLID_11_" fill="#{colorTwo}" points="23.9,23 30.6,23 27.2,18.1"/>
<polygon id="XMLID_10_" fill="#{colorOne}" points="27.2,18.1 30.6,23 30.6,18.1 30.6,13.1"/>
<polygon id="XMLID_9_" fill="#{colorThree}" points="30.6,13.1 30.6,18.1 30.6,23 33.9,18.1"/>
<polygon id="XMLID_8_" fill="#{colorEight}" points="37.3,23 30.6,23 33.9,27.9"/>
<polygon id="XMLID_7_" fill="#{colorFour}" points="30.6,23 37.3,23 33.9,18.1"/>
<polygon id="XMLID_6_" fill="#{colorSix}" points="27.2,27.9 30.6,32.9 30.6,27.9 30.6,23"/>
<polygon id="XMLID_5_" fill="#{colorSeven}" points="30.6,23 30.6,27.9 30.6,32.9 33.9,27.9"/>
<polygon id="XMLID_3_" fill="#E38825" points="37.3,23 30.6,32.9 30.6,37.2 46.3,37.2"/>
<path id="XMLID_2_" fill="#FFFFFF" d="M30.6,19.8c-1.8,0-3.3-1.5-3.3-3.3c0,1.8-1.5,3.3-3.3,3.3c1.8,0,3.3,1.5,3.3,3.3 C27.3,21.2,28.8,19.8,30.6,19.8z"/>
else if type == 'King'
if color == 'red'
- var colorOne = '#F59090'
- var colorTwo = '#F37B7B'
- var colorThree = '#EB5451'
- var colorFour = '#e43532'
- var colorFive = '#F15753'
- var colorSix = '#E14E4B'
- var colorSeven = '#A81F23'
- var colorEight = '#B62026'
else
- var colorOne = '#7DA3D5'
- var colorTwo = '#6795CE'
- var colorThree = '#3480C3'
- var colorFour = '#0075BC'
- var colorFive = '#3C82C4'
- var colorSix = '#0A79BF'
- var colorSeven = '#005490'
- var colorEight = '#005A9A'
svg(version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/" x="0px" y="0px" width="120px" height="67px" viewBox="0 0 59.4 35.5" enable-background="new 0 0 59.4 35.5" xml:space="preserve")
<rect id="XMLID_16_" x="36.2" y="10.9" fill="#E55125" width="9.1" height="4"/>
<rect id="XMLID_15_" x="14.4" y="10.9" fill="#F57E20" width="9.1" height="4"/>
<polygon id="XMLID_14_" fill="#F49221" points="51.5,35.5 59.4,4.8 46.7,6.8 43.6,14.4 36.7,14.6 36.7,2 29.7,0 29.7,35.5"/>
<polygon id="XMLID_13_" fill="#E38825" points="36.4,22.4 29.7,32.3 29.7,35.5 45.3,35.5"/>
<polygon id="XMLID_12_" fill="#FEBB18" points="8,35.5 0,4.8 12.8,6.8 15.8,14.4 22.8,14.6 22.8,2 29.7,0 29.7,35.5"/>
g
<polygon id="XMLID_11_" fill="#{colorFive}" points="29.8,22.4 23.1,22.4 26.4,27.4"/>
<polygon id="XMLID_10_" fill="#{colorTwo}" points="23.1,22.4 29.8,22.4 26.4,17.5"/>
<polygon id="XMLID_9_" fill="#{colorOne}" points="26.4,17.5 29.8,22.4 29.8,17.5 29.8,12.6"/>
<polygon id="XMLID_8_" fill="#{colorThree}" points="29.8,12.6 29.8,17.5 29.8,22.4 33.1,17.5"/>
<polygon id="XMLID_7_" fill="#{colorEight}" points="36.5,22.4 29.8,22.4 33.1,27.4"/>
<polygon id="XMLID_6_" fill="#{colorFour}" points="29.8,22.4 36.5,22.4 33.1,17.5"/>
<polygon id="XMLID_5_" fill="#{colorSix}" points="26.4,27.4 29.8,32.3 29.8,27.4 29.8,22.4"/>
<polygon id="XMLID_4_" fill="#{colorSeven}" points="29.8,22.4 29.8,27.4 29.8,32.3 33.1,27.4"/>
<path id="XMLID_2_" fill="#FFFFFF" d="M29.8,19.2c-1.8,0-3.3-1.5-3.3-3.3c0,1.8-1.5,3.3-3.3,3.3c1.8,0,3.3,1.5,3.3,3.3 C26.5,20.7,28,19.2,29.8,19.2z"/>
// Panel Mixin
mixin panel(position, suit, rank, color)
if rank == 1
- var rank = 'Ace';
else if rank == 11
- var rank = 'Jack';
else if rank == 12
- var rank = 'Queen';
else if rank == 13
- var rank = 'King';
if color == 'black'
- var color = '#363636'
if color == 'red'
- var color = '#d64c4c';
.panel(class=position style='background-color: #{color}')
.rank
if rank == 'Ace' || rank == 'Jack' || rank == 'Queen' || rank == 'King'
=rank.charAt(0)
else
=rank
.suit
| #{rank} of #{suit}s
.icon
+suit(suit, color, 'false')
// Card Mixin
mixin card(suit, rank, color)
if rank == '1'
- var className = 'one'
else if rank == '2'
- var className = 'two'
else if rank == '3'
- var className = 'three'
else if rank == '4'
- var className = 'four'
else if rank == '5'
- var className = 'five'
else if rank == '6'
- var className = 'six'
else if rank == '7'
- var className = 'seven'
else if rank == '8'
- var className = 'eight'
else if rank == '11'
- var className = 'jack'
else if rank == '12'
- var className = 'queen'
else if rank == '13'
- var className = 'king'
.card
// Demo Purposes
.ripple
.ripple
+panel('top', suit, rank, color)
.content(class='#{className}')
div
if rank == '11'
+royal('Jack', color)
span(class='#{color}')
+royal('Jack', color)
else if rank == '12'
+royal('Queen', color)
span(class='#{color}')
+royal('Queen', color)
else if rank == '13'
+royal('King', color)
span(class='#{color}')
+royal('King', color)
else
- for (var i = 0; i < rank; ++i) {
+suit(suit, color, 'true')
- }
+panel('bottom', suit, rank, color)
// Begin
// Pen Title
.pen-title
h1
<span>(Tutorial)</span>
| Material Playing Card
span
| Pen <i class='fa fa-code'></i> by <a href='http://andytran.me'>Andy Tran</a>
// Rerun Button
.rerun
a(href='') Rerun Pen
// Playing Card
+card('Heart', '12', 'red')
// Tip
#tip
h1 How to create a card?
p It's really simple... If you have basic knowledge of Jade. Simple fill out the paramaters in the mixin below, drop it below this box, and watch as magic happens!
code
h1 Jade
p
| Please note that these are case sensitive.
<br>
| // Suits: Spade, Heart, Diamond, Club
<br>
| // Ranks: 1 - 13
<br>
| // Colors: black or red
p <span>+card</span>(<span>Suit</span>, <span>Rank</span>, <span>Color</span>)
h1 Browser Support?
p Tested on the latest versions of <b>Chrome</b>, <b>Firefox</b>, <b>Safari</b>, <b>Internet Explorer</b>, &amp; <b>Opera</b>.
p Best viewed in Firefox incase Chrome hack doesn't work due to it's overflow and scaling bug.
// Portfolio
a#portfolio(href='http://andytran.me/' title='View my portfolio!')
i.fa.fa-link
// CodePen
a#codepen(href='http://codepen.io/andytran/' title='Follow me!')
i.fa.fa-codepen
// Scroll To Bottom
a#scrollToBottom(href='#tip' title='Check out the tutorial!')
i.material-icons &#xE313;
// Sorry JavaScript... But CSS wins this time. :(
@import "bourbon";
// Fonts
$body-font: "RobotoDraft", "Roboto";
// Font Weights
$thin: 100;
$light: 300;
$regular: 400;
$semibold: 600;
$bold: 700;
$ultra: 800;
// Main Colors
$white: #ffffff;
$black: #000000;
$dark-gray: lighten($black, 20%);
$gray: lighten($black, 40%);
$light-gray: lighten($black, 60%);
$lighter-gray: lighten($black, 80%);
// Card Settings
$card-width: 360px;
$card-height: 480px;
// Card Colors
$primary: #363636;
$accent: #d64c4c;
// Base Font
$base-font-color: $gray;
$base-font-family: $body-font, sans-serif;
$base-font-size: 14px;
$base-font-weight: $regular;
$base-line-height: 1;
// Material Shadow Mixin
@mixin materialShadow($level) {
@if $level == 1 {
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
}
@else if $level == 2 {
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
}
@else if $level == 3 {
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23);
}
@else if $level == 4 {
box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
}
@else if $level == 5 {
box-shadow: 0 19px 38px rgba(0, 0, 0, 0.3), 0 15px 12px rgba(0, 0, 0, 0.22);
}
}
/* Body */
body {
background: #ebeff2;
color: $base-font-color;
font-family: $base-font-family;
font-size: $base-font-size;
font-weight: $base-font-weight;
line-height: $base-line-height;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
/* Pen Title */
.pen-title {
padding: 50px 0;
text-align: center;
letter-spacing: 2px;
h1 {
margin: 0 0 20px;
font-size: 48px;
font-weight: 300;
span {
display: block;
margin: 0 0 10px;
color: $accent;
font-size: 18px;
font-weight: $semibold;
text-transform: uppercase;
}
}
span {
font-size: 12px;
.fa {
color: $accent;
}
a {
color: $accent;
font-weight: 600;
text-decoration: none;
}
}
}
/* Rerun Button */
.rerun {
margin: 0 0 30px;
text-align: center;
a {
cursor: pointer;
display: inline-block;
background: $accent;
@include materialShadow(1);
border-radius: 3px;
padding: 10px 20px;
color: $white;
text-decoration: none;
@include transition(0.3s ease);
&:hover {
@include materialShadow(2);
}
}
}
/* Scroll To Bottom */
#scrollToBottom {
position: fixed;
bottom: 30px;
right: 30px;
background: $accent;
width: 56px;
height: 56px;
border-radius: 100%;
@include materialShadow(1);
@include transition(.3s ease);
color: $white;
text-align: center;
i {
line-height: 56px;
}
&:hover {
@include materialShadow(3);
}
}
/* CodePen */
#codepen {
@extend #scrollToBottom;
bottom: 96px;
right: 36px;
background: $primary;
width: 44px;
height: 44px;
@include animation(buttonFadeInUp 1s ease);
i {
line-height: 44px;
}
}
/* Portfolio */
#portfolio {
@extend #scrollToBottom;
bottom: 150px;
right: 43px;
background: $accent;
width: 30px;
height: 30px;
@include animation(buttonFadeInUp 1s ease);
i {
line-height: 30px;
}
}
/* Tip */
#tip {
max-width: 600px;
border-radius: 3px;
margin: 0 auto 100px;
line-height: 1.7em;
text-align: center;
h1 {
margin: 0 0 10px;
color: $dark-gray;
font-size: 24px;
font-weight: 300;
}
p {
margin: 0 0 10px;
color: $gray;
b {
font-weight: $semibold;
}
}
code {
display: block;
background: #232e34;
margin: 0 0 100px;
padding: 10px 20px;
color: #CDD3DE;
letter-spacing: 2px;
text-align: left;
h1 {
dsplay: block;
background: #263238;
margin: -10px -20px 20px;
padding: 10px 20px;
color: #CDD3DE;
font-size: 18px;
&:before {
content: '\f121';
display: inline-block;
margin: 0 10px 0 0;
color: #546E7A;
font: normal normal normal 14px/1 FontAwesome;
font-size: inherit;
text-rendering: auto;
transform: translate(0, 0);
}
}
p {
color: inherit;
&:nth-child(2) {
color: #C3E88D;
}
span {
color: #C38FE5;
&:nth-child(2),
&:nth-child(3),
&:nth-child(4) {
color: #FF5370;
/* color: #C3E88D; */
}
}
}
}
}
/* Card */
.card {
position: relative;
background: $white;
width: $card-width;
height: $card-height;
border-radius: 20px;
@include materialShadow(1);
font-size: 14px;
font-weight: 400;
line-height: 1;
overflow-x: hidden;
overflow-y: hidden;
// Chrome Hack
-webkit-mask-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYGBgAAgwAAAEAAGbA+oJAAAAAElFTkSuQmCC);
.panel {
position: absolute;
width: 100%;
background: $primary;
padding: 30px;
box-sizing: border-box;
color: $white;
&:last-child {
bottom: 0;
}
.rank {
display: inline-block;
font-size: 42px;
font-weight: 100;
}
.suit {
display: inline-block;
padding: 6px 0 0 0;
font-size: 14px;
font-weight: 600;
text-transform: uppercase;
float: right;
}
.icon {
background: $white;
width: 47px;
height: 47px;
margin: 15px 0 -54px -10px;
padding: 13px;
border-radius: 100%;
line-height: 47px;
text-align: center;
box-sizing: border-box;
@include materialShadow(2);
svg {
display: block;
height: 100%;
margin: 0 auto;
}
}
&.bottom {
@include transform(rotate(180deg));
}
}
.content {
display: table;
width: 100%;
height: $card-height;
padding: 110px 20px;
box-sizing: border-box;
text-align: center;
div {
display: table-cell;
vertical-align: middle;
}
svg {
margin: 10px;
&:nth-child(6),
&:nth-child(7),
&:nth-child(8),
&:nth-child(9),
&:nth-child(10) {
@include transform(rotate(180deg));
}
}
&.one {
svg {
@include transform(scale(2));
}
}
&.two,
&.three {
svg {
&:nth-child(2) {
@include transform(rotate(180deg));
}
}
}
&.four {
padding: 0 100px;
svg {
&:nth-child(3),
&:nth-child(4) {
@include transform(rotate(180deg));
}
}
}
&.five,
&.six {
padding: 0 70px;
svg {
&:nth-child(4),
&:nth-child(5) {
@include transform(rotate(180deg));
}
}
}
&.seven,
&.eight {
padding: 0 60px;
svg {
&:nth-child(5) {
@include transform(rotate(180deg));
}
}
}
&.jack,
&.queen,
&.king {
padding: 0 100px;
svg {
margin: 0;
&:nth-child(3) {
@include transform(rotate(180deg));
}
}
span {
display: block;
width: 100%;
margin: 0 0 3px;
text-align: center;
&:before,
&:after {
content: '';
display: inline-block;
width: 7px;
height: 7px;
border-radius: 100%;
margin: 0 3px;
}
&.red {
&:before,
&:after {
background: #ea474c;
}
}
&.black {
&:before,
&:after {
background: #35424a;
}
}
}
}
}
}
/* Animation Level: 1 */
.card {
position: relative;
margin: 0 auto 100px;
@include animation(card 1s ease);
.panel {
@include animation(slideInTop 3s ease);
&:last-child {
@include animation(slideInBottom 3s ease);
}
.rank {
@include animation(fadeInBottom 4s ease);
}
.suit {
@include animation(fadeInRight 4s ease);
}
.icon {
@include animation(scaleIn 3s ease);
}
}
.content {
@include animation(spinIn 3s ease);
}
.ripple {
position: absolute;
top: 50%;
left: 50%;
background: darken($white, 3%);
width: 30px;
height: 30px;
border-radius: 100%;
margin: -15px 0 0 -15px;
@include animation(ripple 1.5s ease);
opacity: 0;
@include animation-delay(1s);
&:nth-child(2) {
background: $white;
@include animation-delay(1.3s);
}
}
}
/* Keyframes */
@include keyframes(card) {
0% {
transform: translateY(200%) rotate(90deg);
}
}
@include keyframes(ripple) {
0% {
display: block;
transform: scale(0);
opacity: 1;
}
50% {
opacity: 1;
}
100% {
transform: scale(50);
opacity: 0;
}
}
@include keyframes(spinIn) {
0% {
opacity: 0;
transform: rotate(90deg);
}
66% {
opacity: 0;
transform: rotate(90deg);
}
90% {
transform: rotate(0deg);
}
}
@include keyframes(scaleIn) {
0% {
transform: scale(0);
}
75% {
transform: scale(0);
}
}
@include keyframes(slideInTop) {
0% {
top: -200px;
opacity: 0;
}
66% {
top: -200px;
opacity: 0;
}
100% {
top: 0;
}
}
@include keyframes(slideInBottom) {
0% {
bottom: -200px;
opacity: 0;
}
66% {
bottom: -200px;
opacity: 0;
}
100% {
bottom: 0;
}
}
@include keyframes(fadeInBottom) {
0% {
transform: translateY(120%);
opacity: 0;
}
60% {
transform: translateY(30%);
opacity: 0;
}
}
@include keyframes(fadeInRight) {
0% {
transform: translateX(120%);
opacity: 0;
}
60% {
transform: translateX(30%);
opacity: 0;
}
}
@include keyframes(buttonFadeInUp) {
0% {
bottom: 30px;
opacity: 0;
}
}
<link href="http://fonts.googleapis.com/css?family=Roboto:400,100,300,500,700,900|RobotoDraft:400,100,300,500,700,900" rel="stylesheet" />
<link href="http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet" />
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment