Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

Save Automatically?

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              
                <section class="o-container" aria-label="Main Listing">
                    <h3 class="h-accessibility">List of Events</h3>
                    <ol class="o-grid o-grid--airy o-list h-ie-grid h-ie-grid--321">
                        <li class="o-grid__item h-colspan--321">
                            <a href="#/whats-on/event/summer-music-camp-2019" class="c-card c-card--event c-card--brand-music">
                                <div aria-hidden="true" class="c-card__image">
                                  <div class="o-image" style="padding-top: 59.7765%;"></div>
                                </div>
                                <h3 class="c-card__title h-text--h5">
                                   Event Name
                                </h3><span class="c-card__badge o-badge h-text--badge">HAC Highlight </span>
                                <h4 class="c-card__datetime"><time datetime="2019-07-25T10:30:00+01:00" itemprop="startDate">Thu 25</time> – <time datetime="2019-07-31T18:00:00+01:00" itemprop="endDate">Wed 31 Jul</time></h4>
                                <p class="c-card__tags h-text--label"><span class="h-accessibility">Categories: </span><span class="c-card__tag c-tag">Tag /&nbsp;</span><span class="c-card__tag c-tag">Tag</span> </p><span class="c-card__action o-button">
                                    Info / Book
                                </span>
                            </a>
                        </li>
                        <li class="o-grid__item  h-colspan--321">
                            <a href="#/whats-on/event/open-mic-night" class="c-card c-card--event c-card--brand-music">
                                <div aria-hidden="true" class="c-card__image">
                                   <div class="o-image" style="padding-top: 59.7765%;"></div>
                                </div>
                                <h3 class="c-card__title h-text--h5">
                                    Event Name
                                </h3><span class="c-card__badge o-badge h-text--badge">Presented by HAC </span>
                                <h4 class="c-card__datetime"><time datetime="2019-07-25T20:00:00+01:00" itemprop="startDate">Thu 25 Jul</time> – <time datetime="2019-08-29T20:00:00+01:00" itemprop="endDate">Thu 29 Aug</time></h4>
                                <p class="c-card__tags h-text--label"><span class="h-accessibility">Categories: </span><span class="c-card__tag c-tag">Tag</span> </p><span class="c-card__action o-button">
                                    Info / Book
                                </span>
                            </a>
                        </li>
                        <li class="o-grid__item  h-colspan--321">
                            <a href="#/whats-on/event/hiu-sham-unka" class="c-card c-card--event c-card--brand-music">
                                <div aria-hidden="true" class="c-card__image">
                                   <div class="o-image" style="padding-top: 59.7765%;"></div>
                                </div>
                                <h3 class="c-card__title h-text--h5">
                                  Event Name
                                </h3>
                                <h4 class="c-card__datetime"><time datetime="2019-07-27T20:30:00+01:00" itemprop="startDate">Sat 27 July</time></h4>
                                <p class="c-card__tags h-text--label"><span class="h-accessibility">Categories: </span><span class="c-card__tag c-tag">Tag</span> </p><span class="c-card__action o-button">
                                    Info / Book
                                </span>
                            </a>
                        </li>
                        <li class="o-grid__item  h-colspan--321">
                            <a href="#/whats-on/event/nabil-abdul-rashid-brap" class="c-card c-card--event c-card--brand-comedy">
                                <div aria-hidden="true" class="c-card__image">
                                    <div class="o-image" style="padding-top: 59.7765%;"></div>
                               
                                </div>
                                <h3 class="c-card__title h-text--h5">
                                    Event Name
                                </h3>
                                <h4 class="c-card__datetime"><time datetime="2019-07-27T20:30:00+01:00" itemprop="startDate">Sat 27 July</time></h4>
                                <p class="c-card__tags h-text--label"><span class="h-accessibility">Categories: </span><span class="c-card__tag c-tag">Tag</span> </p><span class="c-card__action o-button">
                                    Info / Book
                                </span>
                            </a>
                        </li>
                        <li class="o-grid__item  h-colspan--321">
                            <a href="#/whats-on/event/a-midsummer-nights-dream" class="c-card c-card--event c-card--brand-family">
                                <div aria-hidden="true" class="c-card__image">
                                    <div class="o-image" style="padding-top: 59.7765%;"></div>
                                   
                                </div>
                                <h3 class="c-card__title h-text--h5">
                                   Event Name
                                </h3><span class="c-card__badge o-badge h-text--badge">HAC Highlight </span>
                                <h4 class="c-card__datetime"><time datetime="2019-07-29T19:00:00+01:00" itemprop="startDate">Mon 29 July</time></h4>
                                <p class="c-card__tags h-text--label"><span class="h-accessibility">Categories: </span><span class="c-card__tag c-tag">Tag /&nbsp;</span><span class="c-card__tag c-tag">Tag</span> </p><span class="c-card__action o-button">
                                    Info / Book
                                </span>
                            </a>
                        </li>
                        <li class="o-grid__item  h-colspan--321">
                            <a href="#/whats-on/event/quiz-night" class="c-card c-card--event c-card--brand-spoken-word">
                                <div aria-hidden="true" class="c-card__image">
                                    <div class="o-image" style="padding-top: 59.7765%;"></div>
                                </div>
                                <h3 class="c-card__title h-text--h5">
                                     Event Name
                                </h3><span class="c-card__badge o-badge h-text--badge">Presented by HAC </span>
                                <h4 class="c-card__datetime"><time datetime="2019-07-04T20:30:00+01:00" itemprop="startDate">Thu 4 Jul</time> – <time datetime="2019-12-05T19:30:00+00:00" itemprop="endDate">Thu 5 Dec</time></h4>
                                <p class="c-card__tags h-text--label"><span class="h-accessibility">Categories: </span><span class="c-card__tag c-tag">Tag</span> </p><span class="c-card__action o-button">
                                    Info / Book
                                </span>
                            </a>
                        </li>
                        <li class="o-grid__item h-colspan--321">
                            <a href="#/whats-on/event/alice-in-wonderland" class="c-card c-card--event c-card--brand-family">
                                <div aria-hidden="true" class="c-card__image">
                                    <div class="o-image" style="padding-top: 59.7765%;"></div>
                                </div>
                                <h3 class="c-card__title h-text--h5">
                                    Event Name
                                </h3><span class="c-card__badge o-badge h-text--badge">Presented by HAC </span>
                                <h4 class="c-card__datetime"><time datetime="2019-08-19T19:00:00+01:00" itemprop="startDate">Mon 19 August</time></h4>
                                <p class="c-card__tags h-text--label"><span class="h-accessibility">Categories: </span><span class="c-card__tag c-tag">Tag /&nbsp;</span><span class="c-card__tag c-tag">Tag</span> </p><span class="c-card__action o-button">
                                    Info / Book
                                </span>
                            </a>
                        </li>
                        <li class="o-grid__item h-colspan--321">
                            <a href="#/whats-on/event/vaibhav-vashistha-1-1-1-1" class="c-card c-card--event c-card--brand-music">
                                 <div aria-hidden="true" class="c-card__image">
                                    <div class="o-image" style="padding-top: 59.7765%;"></div>
                                </div>
                                <h3 class="c-card__title h-text--h5">
                                   Event Name
                                </h3>
                                <h4 class="c-card__datetime"><time datetime="2019-08-24T20:30:00+01:00" itemprop="startDate">Sat 24 August</time></h4>
                                <p class="c-card__tags h-text--label"><span class="h-accessibility">Categories: </span><span class="c-card__tag c-tag">Tag</span> </p><span class="c-card__action o-button">
                                    Info / Book
                                </span>
                            </a>
                        </li>
                        <li class="o-grid__item  h-colspan--321">
                            <a href="#/whats-on/event/india-vs-pakistan-comedy-clash" class="c-card c-card--event c-card--brand-comedy">
                                <div aria-hidden="true" class="c-card__image">
                                    <div class="o-image" style="padding-top: 59.7765%;"></div>
                                </div>
                                <h3 class="c-card__title h-text--h5">
                                     Event Name
                                </h3>
                                <h4 class="c-card__datetime"><time datetime="2019-09-06T21:00:00+01:00" itemprop="startDate">Fri 6 September</time></h4>
                                <p class="c-card__tags h-text--label"><span class="h-accessibility">Categories: </span><span class="c-card__tag c-tag">Tag</span> </p><span class="c-card__action o-button">
                                    Info / Book
                                </span>
                            </a>
                        </li>
                        <li class="o-grid__item  h-colspan--321">
                            <a href="#/whats-on/event/khan-dhamaka" class="c-card c-card--event c-card--brand-music">
                                <div aria-hidden="true" class="c-card__image">
                                    <div class="o-image" style="padding-top: 59.7765%;"></div>
                                </div>
                                <h3 class="c-card__title h-text--h5">
                                     Event Name
                                </h3>
                                <h4 class="c-card__datetime"><time datetime="2019-09-07T20:30:00+01:00" itemprop="startDate">Sat 7 September</time></h4>
                                <p class="c-card__tags h-text--label"><span class="h-accessibility">Categories: </span><span class="c-card__tag c-tag">Tag</span> </p><span class="c-card__action o-button">
                                    Info / Book
                                </span>
                            </a>
                        </li>
                        <li class="o-grid__item  h-colspan--321">
                            <a href="#/whats-on/event/an-evening-with-parry" class="c-card c-card--event c-card--brand-music">
                                <div aria-hidden="true" class="c-card__image">
                                    <div class="o-image" style="padding-top: 59.7765%;"></div>
                                </div>
                                <h3 class="c-card__title h-text--h5">
                                     Event Name
                                </h3>
                                <h4 class="c-card__datetime"><time datetime="2019-09-13T21:00:00+01:00" itemprop="startDate">Fri 13 September</time></h4>
                                <p class="c-card__tags h-text--label"><span class="h-accessibility">Categories: </span><span class="c-card__tag c-tag">Tag</span> </p><span class="c-card__action o-button">
                                    Info / Book
                                </span>
                            </a>
                        </li>
                        <li class="o-grid__item h-colspan--321">
                            <a href="#/whats-on/event/desi-central-comedy" class="c-card c-card--event c-card--brand-comedy">
                                <div aria-hidden="true" class="c-card__image">
                                  <div class="o-image" style="padding-top: 59.7765%;"></div>
                                </div>
                                <h3 class="c-card__title h-text--h5">
                                     Event Name
                                </h3><span class="c-card__badge o-badge h-text--badge">Presented by HAC </span>
                                <h4 class="c-card__datetime"><time datetime="2019-09-14T20:30:00+01:00" itemprop="startDate">Sat 14 September</time></h4>
                                <p class="c-card__tags h-text--label"><span class="h-accessibility">Categories: </span><span class="c-card__tag c-tag">Tag</span> </p><span class="c-card__action o-button">
                                    Info / Book
                                </span>
                            </a>
                        </li>
                    </ol>
                

                        <nav aria-label="Pagination." class="c-pagination"> 
                            <ol class="c-pagination__list o-list h-text--semibold">
                                <li class="c-pagination__item is-active"><a href="#0" aria-current="page" class="c-pagination__link">1</a></li>
                                <li class="c-pagination__item"><a href="#/whats-on/page-2" rel="prefetch" class="c-pagination__link">2</a></li>
                                <li class="c-pagination__item"><a href="#/whats-on/page-3" rel="prefetch" class="c-pagination__link">3</a></li>
                                <li class="c-pagination__item"><a href="#/whats-on/page-2" class="c-pagination__link"><span aria-label="Next." class="icon i-chevron--right"><svg width="20" height="34" viewBox="0 0 20 34" version="1.1" xmlns="http://www.w3.org/2000/svg" focusable="false">
                                                <path d="M18.368 18.28c.463-.37.695-.88.695-1.529 0-.648-.232-1.158-.695-1.529L3.91.765C2.89-.255 1.848-.255.782.765-.283 1.785-.26 2.803.852 3.823l12.79 12.928L.851 29.68C-.26 30.7-.283 31.719.782 32.738c1.066 1.02 2.109 1.02 3.128 0l14.458-14.457" fill="currentColor" fill-rule="evenodd"></path>
                                            </svg></span></a></li>
                            </ol>
                        </nav>

            
          
!
            
              /**
 * Name         : Card
 * Description  : Cards are the main media object. Lay these out ASAP.
 * State        : green
 */

.c-card {
   //list all possible  elements  of card
  @include grid-template(image, title, badge, tags, summary, datetime, action);
  
  // layout
  display: grid;   
  grid-gap: 0 $b/2;
  height: 100%; //stretch to row height because our cards don't know they are in a parent grid
  grid-template-rows: min-content min-content 1fr 1fr;
  grid-template-columns: 1fr min-content;
  grid-template-areas:
      "image     image"
      "title     title"
      "datetime  datetime"
      "tags      action";
  
  
  // styles per element
  &__image { 
    margin: 0 0 $b/2 0;
    overflow: hidden 
  }
  &__title {
    margin: 0 auto $b/2 0;
    transition: color 0.4s;

    @include on-event(false, ".c-card") {
      color: color(brand, _500);
      text-decoration: underline;
    }
  }
  &__datetime { 
    @include text--page-date;
    margin: 0 auto $b*.75 0;
  }
  &__tags { margin: auto auto 0 0 }
  &__badge { grid-area: image;}
  &__action {
    margin: auto 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    
    @include on-event(false, ".c-card") {
      background: color(black, _500);
      color: color(white, _500);
      border-color: color(black, _500);
    }
  }
}

/**
 * Variants
 * Types of cards: here only event and class
 *
 */

// 1. event
.c-card {
  &--event, &--class {
    padding-bottom: $b*.75;
    border-bottom: 5px solid;
  }
  // 2. classes is same as event but the colors are only class colour (green)
  &--class {
    border-color: color(brand-classes, _500);
  }
}

// colours like panels
@each $color, $color-map in $colors {
  .c-card--#{$color} {
    // color : color(white, _500);
    border-color: map-get($color-map, _500) !important;
  }
}

.o-spacer {display:block; margin:$b*2 auto}
            
          
!
            
              // webpackJsonp([12], {
//   23: function(t, e, n) {
//     var o, s;
//     o = n(463),
//     s = n(464),
//     t.exports = o || {},
//     t.exports.__esModule && (t.exports = t.exports.default),
//     s && (("function" == typeof t.exports ? t.exports.options : t.exports).template = s)
//   },
//   463: function(t, e, n) {
//     "use strict";
//     Object.defineProperty(e, "__esModule", {
//       value: !0
//     }),
//     e.default = {
//       name: "select",
//       data: function() {
//         return {
//           isOpen: !1
//         }
//       },
//       props: {
//         defaultOption: String,
//         currentOption: String,
//         options: Array
//       },
//       mounted: function() {
//         var t = this;
//         window.addEventListener("click", function(e) {
//           t.$el.contains(e.target) || (t.isOpen = !1)
//         })
//       },
//       methods: {
//         selectToggle: function(t) {
//           this.isOpen = !this.isOpen,
//           console.log(this.isOpen)
//         },
//         selectOption: function(t, e) {
//           this.currentOption = t,
//           this.close()
//         },
//         reset: function() {
//           this.currentOption = this.defaultOption,
//           this.close()
//         },
//         close: function() {
//           this.isOpen = !1
//         }
//       }
//     }
//   },
//   464: function(t, e) {
//     t.exports = '\n  <div class="c-select" :class="{\'is-active\' : isOpen}">\n    <button aria-haspopup="listbox" class="o-button--icon c-select__trigger" @click.prevent="selectToggle($event)">\n      <span class="c-select__selected" v-text="currentOption"></span>\n      <span class="c-select__icon icon i-arrow">\n        <svg width="15" height="15" viewBox="0 0 15 15" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#000" fill-rule="nonzero" d="M14 4l-6.5 9L1 4z" stroke="none" stroke-width="1"/></svg>\n      </span>\n    </button>>\n    <ul class="c-select__list" role="listbox" id="category" tabindex="-1" role="listbox" aria-labelledby="category" class="c-dropdown__list" aria-activedescendant="category__theatre">\n  \t\t<li class="c-select__option" role="option" v-for="option in options" v-text="option" @click.prevent="selectOption(option,$event)"></li>\n  \t</ul>\n  </div>\n'
//   }
// });

            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.

Console