Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <main>

<div class=bg-paper></div>

<h1>Buttons, link buttons, and interaction animation</h1>

<section>
  <h2>HTML:</h2>
  <p>Full description: <a target=_blank title="[new window]" class=lnk  href="https://websemantics.uk/articles/shiny-buttons/">Shiny CSS buttons</a></p>
  <div class=container>

    <button class=btn--rect--white-gray>Doing something</button>

    <a href="#" class=btn--rect--white-gray>Going somewhere</a>

    <button class=btn--rect--white-blue>Doing something</button>

    <a href="#" class=btn--rect--white-red>Going somewhere</a>

    <button class=btn--rect--white-green>Doing something</button>

    <a href="#" class=btn--rect--white-purple>Going somewhere</a>

    <button class=btn--rect--white-white>Not accessible</button>

    <a href="#" class=btn--rect--black-black>Not accessible</a>

    <button class=btn--rect--black-white>Doing something</button>

    <a href="#" class=btn--rect--white-cyan>Not accessible</a>

    <button class=btn--rect--black-cyan>Doing something</button>

    <a href="#" class=btn--rect--white-twitter>Not accessible</a>

    <button class=btn--rect--black-twitter>Doing something</button>

    <a href="#" class=btn--rect--white-orange>Not accessible</a>

    <button class=btn--rect--black-orange>Doing something</button>
  
  </div>
</section>


<section>
  <h2>SVGs as CSS background-images (overlaid shadow):</h2>
  <p>Conversion: <a target=_blank title="[new window]" class=lnk href="https://websemantics.uk/tools/svg-to-background-image-conversion/">SVG to CSS background-image converter</a></p>
  <div class=container>
  
    <a href="#" class=btn--rnd--cssbg-twitter>Twitter</a>

    <a href="#" class=btn--rnd--cssbg-facebook>Facebook</a>

    <a href="#" class=btn--rnd--cssbg-linkedin>Linked In</a>

    <a href="#" class=btn--rnd--cssbg-googleplus>Google+</a>

    <a href="#" class=btn--rnd--cssbg-codepen>Codepen</a>

  </div>
</section>


<section>
  
  <h2>SVGs embedded in HTML (underlaid shadow):</h2>
  
  <div class=container>

    <button class=btn--rnd--svg-question><svg><use xlink:href="#icon-question"></use></svg></button>

    <button class=btn--rnd--svg-close><svg><use xlink:href="#icon-close"></use></svg></button>

<!--     <button class=btn--rnd--svg-info><svg><use xlink:href="#icon-info"></use></svg></button> -->
  
    <a href="#" class=btn--rnd--svg-twitter><svg><use xlink:href="#twitter"</svg></a>

    <a href="#" class=btn--rnd--svg-facebook><svg><use xlink:href="#facebook"</svg></a>

    <a href="#" class=btn--rnd--svg-linkedin><svg><use xlink:href="#linkedin"</svg></a>

    <a href="#" class=btn--rnd--svg-googleplus><svg><use xlink:href="#googleplus"</svg></a>

    <a href="#" class=btn--rnd--svg-codepen><svg><use xlink:href="#codepen"</svg></a>

  </div>
</section>
      
      
<svg class=visually-hidden>
  <defs>
    
    <symbol viewbox="0 0 48 48" id="twitter">
      <path d="M15.2 31.44c2.4 0 4.47-.74 6.1-2.08-2.22 0-4-1.5-4.6-3.43.3.15.6.15.9.15.44 0 .88 0 1.33-.15-2.23-.44-3.87-2.38-3.87-4.76.75.3 1.5.6 2.23.6-1.36-.9-2.25-2.38-2.25-4.02 0-.9.15-1.8.6-2.53 2.38 2.98 6.1 4.9 10.12 5.06-.15-.3-.15-.6-.15-1.04 0-2.68 2.23-4.9 4.9-4.9 1.35 0 2.7.58 3.58 1.47 1.2-.27 2.24-.57 3.14-1.17-.3 1.05-1.05 2.1-2.1 2.68 1.05-.14 1.95-.3 2.84-.73-.6 1.04-1.5 1.78-2.53 2.53v.58c0 6.55-4.9 14-14 14-2.67 0-5.2-.9-7.43-2.24h1.2z"/>
    </symbol>
    
    <symbol viewbox="0 0 48 48" id="facebook">
      <path d="M19.6 15.4c0-1.4 0-3.6 1-5C21.8 9 23.2 8 25.8 8c4.2 0 6 .6 6 .6l-.8 4.8s-1.3-.4-2.5-.4c-1.3 0-2.5.4-2.5 1.8v3.8h5.2l-.4 4.8h-5V40h-6.2V23.4h-3.4v-4.8h3.4v-3.2z"/>
    </symbol>
    
    <symbol viewbox="0 0 48 48" id="linkedin">
      <path d="M18.37 19.97V36h-5V19.96h5zm7.96 2.2c.66-1.27 2.3-2.6 4.7-2.6 5.05 0 5.98 3.32 5.98 7.64V36h-4.96v-7.8c0-1.86-.03-4.25-2.58-4.25-2.6 0-3 2.03-3 4.12V36H21.5V19.96h4.76v2.2h.07zM15.88 12c1.6 0 2.88 1.3 2.88 2.9 0 1.6-1.3 2.88-2.88 2.88-1.6 0-2.9-1.3-2.9-2.88 0-1.6 1.3-2.9 2.9-2.9z"/>
    </symbol>
    
    <symbol viewbox="0 0 48 48" id="googleplus">
      <path d="M8.04 23.47c.1-5.5 5.16-10.33 10.66-10.15 2.64-.12 5.12 1.03 7.14 2.64-.86.98-1.75 1.92-2.7 2.8-2.43-1.67-5.9-2.15-8.32-.2-3.47 2.4-3.63 8.06-.3 10.65 3.26 3 9.4 1.5 10.3-3-2.03 0-4.07 0-6.1-.03-.02-1.2-.02-2.4-.02-3.63h10.22c.2 2.87-.17 5.9-1.93 8.27-2.7 3.74-8 4.84-12.2 3.24S7.62 28 8 23.5zm25.82-4.1h3.04c0 1 0 2.04.02 3.06 1.02 0 2.04 0 3.05.02v3.04h-3.05c0 1 0 2-.02 3h-3.04c0-1 0-2.03-.02-3.04-1.02 0-2.04 0-3.05-.03V22.4l3-.02v-3.03z"/>
    </symbol>
    
    <symbol viewbox="0 0 48 48" id="codepen">
      <path d="M24.6 8.5c-.3-.4-.8-.5-1.6 0L8.7 18c-.4 0-.7.4-.7 1.2v9.5c0 .7.3 1 .7 1.3L23 39.6c.7.3 1.3.3 1.6 0L39.3 30c.5-.3.7-.8.7-1.3v-9.5c0-1-.7-1.2-.7-1.2L24.6 8.5zm-2 27.6L12 29l4.7-3.2 6 4.2v6zm2.7 0v-6l6-4 4.7 3-10.5 7zM24 27l-4.8-3 4.8-3.2 4.8 3.2-4.8 3zm-13.3-5.3l3.7 2.3-3.7 2.2v-4.5zm26.6 4.5L33.6 24l3.7-2.3v4.5zm-12-14.4L36 19.2l-4.7 3.2-6-4v-6.6zm-2.6 0v6.4l-6 4.2-4.8-3.2L22.2 12v-.2z"/>
    </symbol>

    <symbol viewBox="0 0 48 48" id="icon-question">
      <path d="M21.76 36.12c-2 .7-2.76 2.7-1.52 4.1.1.1.74.63.9.72 1.35.77 3.5.58 4.62-.58 2.2-2.22-.77-5.35-4-4.24zm3.56-18.08c-.5.85-1.47 1.7-3.7 2.05-4.82.7-6.62-.8-8.2-2.6-1.42-1.7-.88-4.5.1-6.3.7-1.4 2.1-2.7 3.4-3.4 1-.6 2.2-.8 2.78-.9 2.1-.5 3.8-.4 6-.2 2.6.2 5.6 1.4 7.45 3.3 1.43 1.5 2.5 3.1 2.26 5.2-.7 6.4-3.6 7.5-6.5 10-5.6 4.8-2.9 9.2-2.9 9.2l-5.5-1.77s-.1-1.44-.02-2.1c.26-2.36 2.26-3.96 3.8-5.56 1-1 2.8-2.8 3.75-4 3.14-3.83 3.1-6.65-.4-10.26-1.52-1.6-3.2-2.04-5.33-2.04-.7 0-1.94 0-2.74.2-.48.12-1.86.76-2.08.92-1.64 1.2-3.34 3.7-2.2 6.3.9 2.07 3.76 2.38 5.7 1.87-2.15-1.66-1.53-4.64 1.1-5.22.6-.2 1.4-.2 2 0 1.28.52 1.84 1.36 1.84 3.07 0 .77-.2 1.5-.6 2.03z"/>
    </symbol>
    
    <symbol viewBox="0 0 48 48" id="icon-close">
      <path d="M24 21.3l6.3-6.2 2.7 3-6.3 6 6.3 6.6-2.7 2.7L24 27l-6 6-3-2.6 6.5-6.3-6.3-6 3-3 6.2 6.6z"/>
    </symbol>

    <symbol viewBox="0 0 48 48" id="icon-info">
      <path class="x" d="M12 21.7h24v4.6H12z"></path>
      <path class="x" d="M21.7 12h4.6v24h-4.6z"></path>
      <path class="o" d="M25.4 16.97c-.76 0-1.78.42-2.26.42-.95 0-5.62-1.2-6.38.3-.57 1.12-.2 1.7.76 1.9.57 0 2.84-.2 3.6.55.57.4.57 1.7.57 2.46v11.6c0 .58.1 2.47-1 2.66-1.18.2-4-.75-4 1.33 0 .4.2.9.4 1.1.92 1.1 2.62.2 3.8.2 2.23 0 6 .2 8.42.2.37 0 1.5-.4 1.88-.8 1.15-2.08-2.26-1.7-3-1.9-.38 0-.57 0-.76-.18-1.7-1.14-.95-2.85-.95-4.55l.2-12.3c0-.97.16-2.44-.95-3-.12-.03-.23-.04-.36-.04z"></path>
      <circle class="o" cx="23" cy="11" r="4"></circle>
    </symbol>

    <filter id="bg-paper"><feTurbulence type="fractalNoise" baseFrequency="0.05" stitchTiles="stitch" numOctaves="3" result="noise"/><feDiffuseLighting in="noise" lighting-color="#fff" surfaceScale="1" result="diffLight"><feDistantLight azimuth="35" elevation="60"/></feDiffuseLighting></filter>
    
  </defs>
</svg>

</main>

<!-- Footer codepen include -->
[[[https://codepen.io/2kool2/pen/mKeeGM]]]
              
            
!

CSS

              
                /* Generic styling */
*, *::after, *::before {
  box-sizing: border-box;
}
body {
  position: relative;
  font-family: sans-serif;
  line-height: 1.5;
  background-color: #e4dcca;
  margin: 0;
}
main {
  height: 100%;
  padding: 1rem 2rem;
  overflow: auto;
}
h1,h2 {font-weight: 400}
h1 {margin-bottom: 1rem}
h2,p {margin: 1rem 0}
.visually-hidden{position:absolute;overflow:hidden;clip:rect(0 0 0 0);height:1px;width:1px;margin:-1px;padding:0;border:0}
.lnk {
  color: #000 !important;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  transition: all .3s ease-out;
  outline: 0 solid transparent;
}
.lnk:hover,
.lnk:focus {
  background-color: #fff;
  outline: .25em solid #fff;
}
.bg-paper {
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  opacity: 0.5;
  filter: url(#bg-paper);
}
.container {
  display:flex;
  justify-content: space-around;
  align-content: center;
  flex-wrap: wrap;
}

/* Shine yer buttons guv? */

button::-moz-focus-inner {
  padding: 0 !important;
  border: 0 none !important;
}
[class^="btn"] {

  white-space: pre;
  overflow: visible;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  -webkit-appearance: button;
  -webkit-appearance: none;

  text-rendering: optimizeLegibility;
  will-change: transform, box-shadow, text-shadow;
  
  /* Safari fix for thin text on hover */
  -webkit-font-smoothing: subpixel-antialiased;
 
  position: relative;
  display: inline-block;
  font-size: inherit;
  font-weight: 100;
  line-height: 3em;
  text-align: center;
  text-decoration: none !important;
  cursor: pointer;
  margin: 1rem;
  outline: 0 solid;
  border: 1px solid;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.25),
    0 1px 0 rgba(255, 255, 255, 0.25) inset,
    0 0 0 rgba(0, 0, 0, 0.5) inset,
    0 1.25em 0 rgba(255, 255, 255, 0.08) inset,
    0 -1.25em 1.25em rgba(0, 0, 0, 0.3) inset,
    0 1.25em 1.25em rgba(255, 255, 255, 0.1) inset;
  transition: box-shadow 0.3s ease-out,  transform 0.3s ease-out;
}
[class^="btn--rect"] {
  padding: 0 1rem;
  border-radius: .25rem;
}
[class^="btn--rnd"] {
  padding: 0;
  border-radius: 50%;
}

[class^="btn"]:hover {
  box-shadow:
    0 .25em .5em rgba(0, 0, 0, 0.5),
    0 1px 0 rgba(255, 255, 255, 0.25) inset,
    0 0 0 rgba(0, 0, 0, 0.25) inset,
    0 1.25em 0 rgba(255, 255, 255, 0.03) inset,
    0 -1.25em 1.25em rgba(0, 0, 0, 0.15) inset,
    0 1.25em 1.25em rgba(255, 255, 255, 0.05) inset;
}
[class^="btn"]:focus {
  outline: 0 solid;
/*   outline: 4px solid #0ff; */
  box-shadow:
    0 .125em .5em rgba(0, 0, 0, 1),
    0 1px 0 rgba(255, 255, 255, 0.25) inset,
    0 0 0 rgba(0, 0, 0, 0.25) inset,
    0 1.25em 0 rgba(255, 255, 255, 0.03) inset,
    0 -1.25em 1.25em rgba(0, 0, 0, 0.15) inset,
    0 1.25em 1.25em rgba(255, 255, 255, 0.05) inset;
}

[class^="btn--rect"]:hover {
  will-change: transform, box-shadow, text-shadow;
  transform: scale(1.02);
}
[class^="btn--rnd"]:hover {
  will-change: transform, box-shadow;
  transform: scale(1.15);
}
[class^="btn"].-js-clicked {
  animation: btn-pressed .3s ease-out forwards;
}

@keyframes btn-pressed {
  50% {
    transform: scale(.985);
    box-shadow:
      0 0 0 rgba(255, 255, 255, 0),
      0 1px 0 rgba(255, 255, 255, 0) inset,
      0 0 .5em rgba(0, 0, 0, 0.5) inset,
      0 1.25em 0 rgba(255, 255, 255, 0.03) inset,
      0 -1.25em 1.25em rgba(0, 0, 0, 0.15) inset,
      0 1.25em 1.25em rgba(255, 255, 255, 0.05) inset;
  }
}

[class^="btn--rect"]::before {
  content: "";
  display: block;
  position: absolute;
  background:-webkit-gradient(linear, left top, right top, from(rgba(255,255,255,0)),color-stop(50%, rgba(255,255,255,1)),to(rgba(255,255,255,0)));
background:-webkit-linear-gradient(left, rgba(255,255,255,0) 0%,rgba(255,255,255,1) 50%,rgba(255,255,255,0) 100%);
background:-o-linear-gradient(left, rgba(255,255,255,0) 0%,rgba(255,255,255,1) 50%,rgba(255,255,255,0) 100%);
background:linear-gradient(left, rgba(255,255,255,0) 0%,rgba(255,255,255,1) 50%,rgba(255,255,255,0) 100%);
  padding: 0 12px;
  top: 0;
  left: 15%;
  height: 1px;
  width: 40%;
  box-shadow: 0 1px 5px rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease-in-out 0s;
}
[class^="btn--rect"]:active::before {
  opacity: 0;
}
[class^="btn--rect"]:hover::before,
[class^="btn--rect"]:focus::before {
  left: 45%;
}
/* Button colours defined here */

[class^="btn--"][class*="--white"] {
  color: #fff; 
  font-weight: 100;
  letter-spacing: .025em;
  text-shadow: 0 0 2px #000;
}
[class^="btn--"][class*="--black"] {
  color: #000;
  font-weight: 400;
}

[class^="btn--"][class*="--white-gray"] {
  background-color: #555;
  border-color:  #222;
}

[class^="btn--"][class*="--white-red"] {
  background-color: #f00;
  border-color:  #500;
}
[class^="btn--"][class*="--white-green"] {
  /* Brightest WCAG 2 green with text-shadow */
  background-color: #009700;
  border-color:  #050;
}
[class^="btn--"][class*="--white-blue"] {
  background-color: #00f;
  border-color:  #007;
}

[class^="btn--"][class*="--white-white"] {
  /* Fails WCAG 2 */
  background-color: #fff;
  border-color: #777;
}
[class^="btn--"][class*="--black-black"] {
  /* Fails WCAG 2 */
  background-color: #000;
  border-color: #777;
  text-shadow: 0 0 2px #fff;
}

[class^="btn--"][class*="--white-black"] {
  background-color: #000;
  border-color:  #000;
}
[class^="btn--"][class*="--black-white"] {
  background-color: #fff;
  border-color:  #777;
}

[class^="btn--"][class*="--white-purple"] {
  background-color: #4b3f5e;
  border-color: #291b38;
}

[class^="btn--"][class*="--white-cyan"] {
  /* Fails WCAG 2 */
  background-color: #0ff;
  border-color: #099;
}
[class^="btn--"][class*="--black-cyan"] {
  background-color: #0ff;
  border-color: #099;
}

[class^="btn--"][class*="--white-twitter"] {
  /* Fails WCAG 2 */
  background-color: #1DA1F2;
  border-color: #066;
}
[class^="btn--"][class*="--black-twitter"] {
  background-color: #1DA1F2;
  border-color: #066;
}


[class^="btn--"][class*="--white-orange"] {
  /* Closest WCAG 2 pass to #f60 with textshadow */
  background-color: #d94000; /*#f60;*/
  border-color: #930;
}
[class^="btn--"][class*="--black-orange"] {
  background-color: #f60;
  border-color: #930;
}




/* Social links: CSS backgrounds */

[class^="btn--rnd--cssbg"] {
  background-color: currentColor;
  text-indent: -999rem;
  width: 4rem;
  height: 4rem;
}

.btn--rnd--cssbg-twitter {
  color: hsl(200, 72%, 55%);
  border-color: hsl(200, 72%, 45%);
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 48 48' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23fff' d='M15.2 31.44c2.4 0 4.47-.74 6.1-2.08-2.22 0-4-1.5-4.6-3.43.3.15.6.15.9.15.44 0 .88 0 1.33-.15-2.23-.44-3.87-2.38-3.87-4.76.75.3 1.5.6 2.23.6-1.36-.9-2.25-2.38-2.25-4.02 0-.9.15-1.8.6-2.53 2.38 2.98 6.1 4.9 10.12 5.06-.15-.3-.15-.6-.15-1.04 0-2.68 2.23-4.9 4.9-4.9 1.35 0 2.7.58 3.58 1.47 1.2-.27 2.24-.57 3.14-1.17-.3 1.05-1.05 2.1-2.1 2.68 1.05-.14 1.95-.3 2.84-.73-.6 1.04-1.5 1.78-2.53 2.53v.58c0 6.55-4.9 14-14 14-2.67 0-5.2-.9-7.43-2.24h1.2z'/%3E%3C/svg%3E");
}

.btn--rnd--cssbg-facebook {
  color: hsl(226, 42%, 41%);
  border-color: hsl(226, 42%, 31%);
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 48 48' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23fff' d='M19.6 15.4c0-1.4 0-3.6 1-5C21.8 9 23.2 8 25.8 8c4.2 0 6 .6 6 .6l-.8 4.8s-1.3-.4-2.5-.4c-1.3 0-2.5.4-2.5 1.8v3.8h5.2l-.4 4.8h-5V40h-6.2V23.4h-3.4v-4.8h3.4v-3.2z'/%3E%3C/svg%3E");
}

.btn--rnd--cssbg-linkedin {
  color: hsl(199, 100%, 35%);
  border-color: hsl(199, 100%, 25%);
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 48 48' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23fff' d='M18.37 19.97V36h-5V19.96h5zm7.96 2.2c.66-1.27 2.3-2.6 4.7-2.6 5.05 0 5.98 3.32 5.98 7.64V36h-4.96v-7.8c0-1.86-.03-4.25-2.58-4.25-2.6 0-3 2.03-3 4.12V36H21.5V19.96h4.76v2.2h.07zM15.88 12c1.6 0 2.88 1.3 2.88 2.9 0 1.6-1.3 2.88-2.88 2.88-1.6 0-2.9-1.3-2.9-2.88 0-1.6 1.3-2.9 2.9-2.9z'/%3E%3C/svg%3E");
}

.btn--rnd--cssbg-googleplus {
  color: hsl(7, 71%, 55%);
  border-color: hsl(7, 71%, 45%);
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 48 48' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23fff' d='M8.04 23.47c.1-5.5 5.16-10.33 10.66-10.15 2.64-.12 5.12 1.03 7.14 2.64-.86.98-1.75 1.92-2.7 2.8-2.43-1.67-5.9-2.15-8.32-.2-3.47 2.4-3.63 8.06-.3 10.65 3.26 3 9.4 1.5 10.3-3-2.03 0-4.07 0-6.1-.03-.02-1.2-.02-2.4-.02-3.63h10.22c.2 2.87-.17 5.9-1.93 8.27-2.7 3.74-8 4.84-12.2 3.24S7.62 28 8 23.5zm25.82-4.1h3.04c0 1 0 2.04.02 3.06 1.02 0 2.04 0 3.05.02v3.04h-3.05c0 1 0 2-.02 3h-3.04c0-1 0-2.03-.02-3.04-1.02 0-2.04 0-3.05-.03V22.4l3-.02v-3.03z'/%3E%3C/svg%3E");
}

.btn--rnd--cssbg-codepen {
  color: #000;
  border-color: #000;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 48 48' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23fff' d='M24.6 8.5c-.3-.4-.8-.5-1.6 0L8.7 18c-.4 0-.7.4-.7 1.2v9.5c0 .7.3 1 .7 1.3L23 39.6c.7.3 1.3.3 1.6 0L39.3 30c.5-.3.7-.8.7-1.3v-9.5c0-1-.7-1.2-.7-1.2L24.6 8.5zm-2 27.6L12 29l4.7-3.2 6 4.2v6zm2.7 0v-6l6-4 4.7 3-10.5 7zM24 27l-4.8-3 4.8-3.2 4.8 3.2-4.8 3zm-13.3-5.3l3.7 2.3-3.7 2.2v-4.5zm26.6 4.5L33.6 24l3.7-2.3v4.5zm-12-14.4L36 19.2l-4.7 3.2-6-4v-6.6zm-2.6 0v6.4l-6 4.2-4.8-3.2L22.2 12v-.2z'/%3E%3C/svg%3E");
}



/* Social links: HTML embedded SVG */

[class^="btn--rnd--svg"] {
  fill: #fff;
  background-color: currentColor;
}
[class^="btn--rnd--svg"] > svg {
  display: block;
  width: 4rem;
  height: 4rem;
  pointer-events: none;
  transition: all .3s ease-out;
}

.btn--rnd--svg-question {
  color: #FAFAFD;
  border-width: 2px;
  border-color: #ccc;
  fill: green;
}
.btn--rnd--svg-question:hover,
.btn--rnd--svg-question:focus {
  fill: #418cec;
  border-color: #418cec;
}


.btn--rnd--svg-close {
  color: #FAFAFD;
  border-width: 2px;
  border-color: #ccc;
  fill: green;
}
.btn--rnd--svg-close:hover,
.btn--rnd--svg-close:focus {
  fill: #418cec;
  border-color: #418cec;
}

.btn--rnd--svg-twitter {
  color: hsl(200, 72%, 55%);
  border-color: hsl(200, 72%, 45%);
}

.btn--rnd--svg-facebook {
  color: hsl(226, 42%, 41%);
  border-color: hsl(226, 42%, 31%);
}

.btn--rnd--svg-linkedin {
  color: hsl(199, 100%, 35%);
  border-color: hsl(199, 100%, 25%);
}

.btn--rnd--svg-googleplus {
  color: hsl(7, 71%, 55%);
  border-color: hsl(7, 71%, 45%);
}

.btn--rnd--svg-codepen {
  color: #000;
  border-color: #000;
}
              
            
!

JS

              
                var supportsES6 = (function() {
  // https://gist.github.com/bendc/d7f3dbc83d0f65ca0433caf90378cd95
  try {
    new Function('(a = 0) => a');
    return true;
  }
  catch (err) {
    return false;
  }
}());



var Button_Click_Animation = (function (window, document) {

  'use strict';
  if (!supportsES6) return;

  const buttons = document.querySelectorAll('[class^=btn--]');
  const clickedClass = '-js-clicked';

  const btn_clicked = e => {
    const btn = e.target;
    btn.classList.add(clickedClass);
    btn.addEventListener('animationend', e => {
      btn.classList.remove(clickedClass);
    }, {once: true});
    btn.focus();
  };

  Object.values(buttons).forEach(btn => {
    btn.addEventListener('click', btn_clicked);
    btn.addEventListener('blur', e => {
      e.target.classList.remove(clickedClass);
    });
  });

}(window, document));
              
            
!
999px

Console