Pen Settings



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


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


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.


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.


                <div class="google-expando--wrap">
  <div class="google-expando">

    <div class="google-expando__icon">
      <svg xmlns="//" viewBox="0 0 48 48">
        <path d="M38 26H26v12h-4V26H10v-4h12V10h4v12h12v4z"></path>
      <span class="visuallyhidden" aria-hidden="true">Expand Card</span>

    <div class="google-expando__card" aria-hidden="true">
      <img src="//" alt="">
      Material Design Expando Card



                // Demo Styles *don't use*
*{&:before,&:after{box-sizing: inherit;}}html{box-sizing: border-box;}html,body{margin: 0;padding: 0;height: 100%;font: normal 100%/1.5 source-sans-pro, sans-serif;font-weight: 400;color: #333;background: #B4E0E1;}body,.google-expando__card{display: flex;flex-direction: column;align-items: center;justify-content: center;}img{max-width: 100%;height:100px;}

// Google Expando Config
$google_expando_radius: 2px;
$google_expando_whsp: 48px;

$google_materialshadow_ambient: (
  shadow1: 0 1px 1.5px rgba(0, 0, 0, 0.12),
  shadow2: 0 1px 1px rgba(0, 0, 0, 0.24)

$google_materialshadow: (
  ambient: map-values($google_materialshadow_ambient)

$google_expando_proportions: (
  icon_size: 24px,
  card_size: 340px

$google_expando_transition: (
  transition_one: .2s all cubic-bezier(.4,0,.2,1)

// Google Expando Styles !Required!
.google-expando {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  &--wrap {
    position: relative;
    width: 100%;

.google-expando__icon {
  border-radius: 90%;
  box-shadow: map-get($google_materialshadow, ambient);
  height: map-get($google_expando_proportions, icon_size);
  width: map-get($google_expando_proportions, icon_size);
  padding: $google_expando_whsp/8;
  transition: map-values($google_expando_transition);
  z-index: 2;
  text-align: center;
  background: #224687;
  color: white;

  svg {
    height: map-get($google_expando_proportions, icon_size);
    vertical-align: text-bottom;
    width: map-get($google_expando_proportions, icon_size);
    fill: white;

  &:hover {
    cursor: pointer;

.google-expando__card {
  border-radius: $google_expando_radius;
  box-shadow: map-get($google_materialshadow, ambient);
  height: auto;
  max-width: map-get($google_expando_proportions, card_size);
  margin: 0 auto;
  position: absolute;
  top: (map-get($google_expando_proportions, icon_size) * 2) / 3;
  left: 0;
  right: 0;
  transform: scale(0) translateZ(0);
  transition: map-values($google_expando_transition);
  transform-origin: top center;
  z-index: 1;
  background: white;
  opacity: 0;

// Google Expando State {
  transform: rotate(45deg);
} {
  height: auto;
  padding: $google_expando_whsp;
  transform: scale(1) translateZ(0);
  opacity: 1;

// Google Expando Utility Helpers
.visuallyhidden {
    border: 0;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;

.visuallyhidden.focusable:focus {
    clip: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    position: static;
    width: auto;


                // Google Expando Method
// =====================================================

function googleExpandoToggle() {
  $expando_card = $('.google-expando__card');

  // ARIA
  $expando_card.attr('aria-hidden') === 'true' ? $expando_card.attr('aria-hidden', 'false') : $expando_card.attr('aria-hidden', 'true');

// Google Expando Event
// =====================================================

$('.google-expando__icon').on('click', function() {;