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


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


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.


              <!DOCTYPE html>
<html lang="en">

  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <link href=",300i,400,400i,600,600i,700,700i,800,800i&display=swap" rel="stylesheet">
  <title>Slack From Scratch</title>

  <div class="slack-card">
    <div class="header-with-img">
      <div class="name-and-position">
        <div class="name">Florian Kempenich<span class="status"></span></div>
        <div class="position">Professional CSS Beginner</div>
    <div class="time-and-date">
      <span id="time"></span> local time
    <ul class="profile-actions">
      <li class="profile-action">View preferences</li>
      <li class="profile-action">Open account settings</li>
      <li class="profile-action">Edit your profile</li>
      <li class="profile-action">View your files</li>
      <li class="profile-action">Set yourself away</li>
  <aside id="thanks">Thank you Rui Costa for all the help with this one</aside>



              body {
  font-family: "Open Sans", sans-serif;

.slack-card {
  margin: 30px;
  border-radius: 6px;
  overflow: hidden;
  width: 300px;
  background: white;
  box-shadow: 2.5px 2.5px 15px -5px grey;
  font-family: "Open Sans", sans-serif;

.slack-card > * {
  padding-left: 15px;

.header-with-img {
  width: auto;
  height: 210px;
  background-image: linear-gradient(to top, #00000060, #00000000 40%),
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center center;
  position: relative;

.name-and-position {
  position: absolute;
  bottom: 10px;
  color: white;

.name {
  position: static;
  font-weight: bold;

.status {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-left: 7px;
  border-radius: 50%;
  animation: pulse 1s ease-out 0s alternate infinite none running;

@keyframes pulse {
  0% {
    background-color: #92d400;

  80% {
    transform: scale(1);
    background-color: #92d400;

  100% {
    transform: scale(1.1);
    background-color: #ace12e;

.position {
  font-weight: lighter;
  font-size: 0.8em;

.time-and-date {
  height: 30px;
  line-height: 30px;
  font-size: 0.7em;
  font-weight: lighter;
  border-top: solid 1px #f4f4f7;
  border-bottom: solid 1px #f4f4f7;

.profile-actions {
  margin: 5px 0 5px 0px;
  padding: 0;
  list-style-type: none;

.profile-action {
  padding: 3.5px 0 3.5px 20px;
  font-size: 0.8em;
  cursor: pointer;

.profile-action:hover {
  background-color: #f9f9f9;

#thanks {
  margin-top: 80px;
  padding-top: 10px;
  border-top: solid 1px lightgrey;
  font-weight: lighter;
  font-size: 0.8em;
#thanks aside {
  color: #f4f4f7;


              function formatAMPM(date) {
  var hours = date.getHours();
  var minutes = date.getMinutes();
  var ampm = hours >= 12 ? "PM" : "AM";
  hours = hours % 12;
  hours = hours ? hours : 12;
  minutes = minutes < 10 ? "0" + minutes : minutes;
  var strTime = hours + ":" + minutes + " " + ampm;
  return strTime;

function updateCurrentTime() {
  document.getElementById("time").innerHTML = formatAMPM(new Date());

setInterval(updateCurrentTime, 1000);