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

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.

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

              
                .container
  .elemento
    .calendario
      .cal-header
        Events Calendar
      .cal-body
        .cal-row
          .badge.rosso
          .date 
            .month ago 
            .day 01
          .info
            %a{:href => "#"} first event info
            .info-time 
              %i.fa.fa-clock-o
              20:30
            .info-loc 
              %a{:href => "#"} 
                %i.fa.fa-map-marker 
                Basilica dei Frari, Venezia
        .cal-row
          .badge
          .date 
            .month ago 
            .day 02
          .info
            %a{:href => "#"} second event info
            .info-time 
              %i.fa.fa-clock-o
              20:00
            .info-loc 
              %a{:href => "#"} 
                %i.fa.fa-map-marker 
                Verona
        .cal-row
          .badge.blu
          .date 
            .month ago 
            .day 03
          .info
            %a{:href => "#"} third event info
            .info-time 
              %i.fa.fa-clock-o
              21:00
            .info-loc 
              %a{:href => "#"} 
                %i.fa.fa-map-marker 
                Teatro Comunale, Vicenza

              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css?family=Lato');
@import url('https://fonts.googleapis.com/css?family=Open+Sans');


$size: 300px;

$bgcol: rgb(255, 255, 255); //rgba(0, 128, 128, 0.62);

body {
  margin: 0;
  top: 0;
  background-color: $bgcol;
  background-image: radial-gradient($bgcol, rgba(0, 0, 0, .2));
  font-family: "Open Sans", sans-serif;
}

.container {
  display: flex;
  flex-flow: row wrap;
  height: 100vh;
  align-items: center;

  .elemento {
    min-width: $size;
    height: $size;
    margin: 10px auto;
    //text-align: center;
  }
}

$rowHeight: 75px;
$bordo: 5px;
$fontColor: #333;

$bDebug: false;

.calendario {
  width: 100%;
  @if $bDebug {
    border: 1px grey solid;
  }
  padding: 10px;
  .cal-header {
    margin: 5px $bordo 10px;
    font-family: 'Lato', 'Open Sans', sans-serif;
    font-weight: bold;
    font-size: 1.3em;
    text-transform: uppercase;
  }
  .cal-body {
    //border: 1px grey solid;
  }
  .cal-row {
    border-top: 1px lightgrey solid;
    border-right: 1px lightgrey solid;
    &:last-child {
      border-bottom: 1px lightgrey solid;
    }
    position: relative;
    display: block;
    height: $rowHeight;
    color: $fontColor;
    transition: all ease 0.9s;

    &:hover {
      .badge {
        width: 100%;
      }
      .date, .info, .info a {
        color: #f8f8ff;
      }
    }
    .badge {
      @if $bDebug {
        border: 1px yellow solid;
      }
      display: block;
      position: absolute;
      z-index: -1;
      top: 0;
      bottom: 0;
      margin: 0 0 0 0px;
      transition: .9s ease-in-out;
      width: $bordo;
      background-color: #333333;
    }
    .rosso {
      background-color: #dd3333;
    }
    .blu {
      background-color: #3333dd;
    }
    .verde {
      background-color: #33dd33;
    }

    .date, .info {
      @if $bDebug {
        border: 1px lightblue solid;
      }
      display: inline-block;
      vertical-align: top;
      height: 100%;
      transition: all ease 0.9s;
    }
    .date {
      width: 15%;
      margin: 0 10px 0 $bordo*2;
      font-family: 'Lato', 'Open Sans', sans-serif;
      text-align: center;
      .month {
        text-transform: uppercase;
        line-height: 0.5;
        margin-top: 10px;
      }
      .day {
        font-size: 1.5em;
        font-weight: bold;
      }
    }
    .info {
      text-align: left;
      a {
        color: $fontColor;
        //font-weight: 700;
        text-decoration: none;
        transition: all ease 0.9s;
        &:hover {
          text-decoration: underline;
        }
      }
      .info-time, .info-loc {
        font-size: .8em;
      }
    }
  }
}

              
            
!

JS

              
                
              
            
!
999px

Console