Pen Settings

HTML

CSS

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

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

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.

Editor Settings

Code Indentation

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

Visit your global Editor Settings.

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.

HTML

            
              <p>The same markup, but without CSS styling:

<time datetime="2014-09-24" class="">
<span class="weekday">Wednesday</span>
<span class="day">24</span>
<span class="month">September</span>
<span class="year">2014</span>
</time>

</p>

<p>position: absolute; font-size and top in px;</p>

<time datetime="2014-09-24" class="date-as-calendar position-pixels">
<span class="weekday">Wednesday</span>
<span class="day">24</span>
<span class="month">September</span>
<span class="year">2014</span>
</time>

<p>position: absolute; font-size and top in em;</p>

<time datetime="2014-09-24" class="date-as-calendar position-em size0_5x">
<span class="weekday">Wednesday</span>
<span class="day">24</span>
<span class="month">September</span>
<span class="year">2014</span>
</time>

<time datetime="2014-09-24" class="date-as-calendar position-em size0_75x">
<span class="weekday">Wednesday</span>
<span class="day">24</span>
<span class="month">September</span>
<span class="year">2014</span>
</time>

<time datetime="2014-09-24" class="date-as-calendar position-em size1x">
<span class="weekday">Wednesday</span>
<span class="day">24</span>
<span class="month">September</span>
<span class="year">2014</span>
</time>

<time datetime="2014-09-24" class="date-as-calendar position-em size1_25x">
<span class="weekday">Wednesday</span>
<span class="day">24</span>
<span class="month">September</span>
<span class="year">2014</span>
</time>

<time datetime="2014-09-24" class="date-as-calendar position-em size1_5x">
<span class="weekday">Wednesday</span>
<span class="day">24</span>
<span class="month">September</span>
<span class="year">2014</span>
</time>

<time datetime="2014-09-24" class="date-as-calendar position-em size1_75x">
<span class="weekday">Wednesday</span>
<span class="day">24</span>
<span class="month">September</span>
<span class="year">2014</span>
</time>

<time datetime="2014-09-24" class="date-as-calendar position-em size2x">
<span class="weekday">Wednesday</span>
<span class="day">24</span>
<span class="month">September</span>
<span class="year">2014</span>
</time>

<time datetime="2014-09-24" class="date-as-calendar position-em size3x">
<span class="weekday">Wednesday</span>
<span class="day">24</span>
<span class="month">September</span>
<span class="year">2014</span>
</time>

<p>display: inline-flex; font-size in em;</p>

<time datetime="2014-09-24" class="date-as-calendar inline-flex size0_5x">
<span class="weekday">Wednesday</span>
<span class="day">24</span>
<span class="month">September</span>
<span class="year">2014</span>
</time>

<time datetime="2014-09-24" class="date-as-calendar inline-flex size0_75x">
<span class="weekday">Wednesday</span>
<span class="day">24</span>
<span class="month">September</span>
<span class="year">2014</span>
</time>

<time datetime="2014-09-24" class="date-as-calendar inline-flex size1x">
<span class="weekday">Wednesday</span>
<span class="day">24</span>
<span class="month">September</span>
<span class="year">2014</span>
</time>

<time datetime="2014-09-24" class="date-as-calendar inline-flex size1_25x">
<span class="weekday">Wednesday</span>
<span class="day">24</span>
<span class="month">September</span>
<span class="year">2014</span>
</time>

<time datetime="2014-09-24" class="date-as-calendar inline-flex size1_5x">
<span class="weekday">Wednesday</span>
<span class="day">24</span>
<span class="month">September</span>
<span class="year">2014</span>
</time>

<time datetime="2014-09-24" class="date-as-calendar inline-flex size1_75x">
<span class="weekday">Wednesday</span>
<span class="day">24</span>
<span class="month">September</span>
<span class="year">2014</span>
</time>

<time datetime="2014-09-24" class="date-as-calendar inline-flex size2x">
<span class="weekday">Wednesday</span>
<span class="day">24</span>
<span class="month">September</span>
<span class="year">2014</span>
</time>

<time datetime="2014-09-24" class="date-as-calendar inline-flex size3x">
<span class="weekday">Wednesday</span>
<span class="day">24</span>
<span class="month">September</span>
<span class="year">2014</span>
</time>
            
          
!

CSS

            
              @import url(https://fonts.googleapis.com/css?family=Source+Code+Pro|Oswald);

/****************************************/
/* Styling rules, such as font and colors */
.date-as-calendar {
  font-variant: normal;
  font-style: normal;
  font-weight: normal;
  font-family: "Helvetica", "Arial", sans-serif;

  /* It seems vertical-align: baseline does not work correctly with display: inline-flex. */
  vertical-align: top;

  /* margin: 1ex; */

  color: black;
  background: white;
  background : linear-gradient(to bottom right, #FFF 0%, #EEE 100%);

  border: 1px solid #888;
  border-radius: 3px;
  overflow: hidden;

  box-shadow: 2px 2px 2px -2px black;
}
.date-as-calendar .weekday,
.date-as-calendar .day,
.date-as-calendar .month,
.date-as-calendar .year {
  text-align: center;
  line-height: 1.0;
}
.date-as-calendar .month {
  font-family: "Oswald", sans-serif;
  text-transform: uppercase;
  background: #B11;
  background : linear-gradient(to bottom right, #D66 0%, #A00 100%);
  color: white;
}

/****************************************/
/* Layout rules using position: absolute and pixels. */
.position-pixels.date-as-calendar {
  display: inline-block;
  position: relative;
  width: 64px;
  height: 64px;
}
.position-pixels.date-as-calendar .weekday,
.position-pixels.date-as-calendar .day,
.position-pixels.date-as-calendar .month,
.position-pixels.date-as-calendar .year {
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  width: 100%;
  height: 1em;
}
.position-pixels.date-as-calendar .month {
  top: 0px;
  font-size: 12px;
  padding: 2px 0;
}
.position-pixels.date-as-calendar .weekday {
  top: 16px;
  font-size: 10px;
}
.position-pixels.date-as-calendar .day {
  top: 26px;
  font-size: 24px;
}
.position-pixels.date-as-calendar .year {
  top: 50px;
  font-size: 14px;
}

/****************************************/
/* Layout rules using position: absolute and relative dimensions using em. */
.position-em.date-as-calendar {
  display: inline-block;
  position: relative;
  
  width: 4em; 
  height: 4em; 
}
.position-em.date-as-calendar .weekday,
.position-em.date-as-calendar .day,
.position-em.date-as-calendar .month,
.position-em.date-as-calendar .year {
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  width: 100%;
  height: 1em;
}
.position-em.date-as-calendar .month {
  top: 0px;
  font-size: 0.75em;
  padding: 0.1em 0;
}
.position-em.date-as-calendar .weekday {
  top: 1.6em;
  font-size: 0.6125em;
}
.position-em.date-as-calendar .day {
  top: 1.1em;
  font-size: 1.5em
}
.position-em.date-as-calendar .year {
  bottom: 0px;
  font-size: 0.87750em;
}

/****************************************/
/* Layout rules using display: inline-flex and relative dimensions using em. */
.inline-flex.date-as-calendar {
  display: inline-flex;
  flex-direction: column;
  flex-wrap: nowrap;
  justify-content: space-between;
  
  width: 4em; 
  height: 4em; 
}
.inline-flex.date-as-calendar .weekday,
.inline-flex.date-as-calendar .day,
.inline-flex.date-as-calendar .month,
.inline-flex.date-as-calendar .year {
  display: block;
  flex: 1 1 auto;
}
.inline-flex.date-as-calendar .month {
  order: 1;
  font-size: 0.75em;
  padding: 0.1em 0;
}
.inline-flex.date-as-calendar .weekday {
  order: 2;
  font-size: 0.6125em;
}
.inline-flex.date-as-calendar .day {
  order: 3;
  font-size: 1.5em;
}
.inline-flex.date-as-calendar .year {
  order: 4;
  font-size: 0.87750em;
}

/****************************************/
/* Multiple sizes. */
.date-as-calendar.size0_5x {
  font-size: 8px;
}
.date-as-calendar.size0_75x {
  font-size: 12px;
}
.date-as-calendar.size1x {
  font-size: 16px;
}
.date-as-calendar.size1_25x {
  font-size: 20px;
}
.date-as-calendar.size1_5x {
  font-size: 24px;
}
.date-as-calendar.size1_75x {
  font-size: 28px;
}
.date-as-calendar.size2x {
  font-size: 32px;
}
.date-as-calendar.size3x {
  font-size: 48px;
}
            
          
!

JS

            
              
            
          
!
999px

Console