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.

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 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.


                <header class="header">

<div class="o-grid o-grid--3 points-wrapper">
  <div class="c-point c-point--1">
    <h3 class="c-point__title">Responsive Web Design</h3>
  <div class="c-point c-point--2">
    <h3 class="c-point__title">UX Auditing</h3>
  <div class="c-point c-point--3">
    <h3 class="c-point__title">Front End Development</h3>
  <div class="c-point c-point--4">
    <h3 class="c-point__title">UX Consultation</h3>
  <div class="c-point c-point--5">
    <h3 class="c-point__title">Mobile Apps Design</h3>
  <div class="c-point c-point--6">
    <h3 class="c-point__title">UX Research</h3>

<div class="vu-watcher">
  <form action="" onsubmit='return false'>
      <label for="element">Element class</label>
      <input id="element" type="text" placeholder="Class name">
      <label for="property">Property</label>
      <input id="property" type="text" placeholder="Property name">
  <div class="vu-watcher-items"></div>

<template id="mytemplate">
   <div class="vu-watcher-box">
      <p class="name">element class</p>
      <p class="value">element value</p>


                $color-main: #856dc1;

.header {
  background: #eee;
  padding: 1rem;
  border-top: calc(2px + 0.138vw) solid $color-main;
  margin-bottom: 2rem;
  h1 {
    font-weight: bold;

.points-wrapper {
    counter-reset: points;

.c-point {
    display: flex;
    align-items: center;
    background: #f3f3f3;
    border-radius: 10vw;
    padding: 10px;

    &:before {
        counter-increment: points;
        content: "0" counter(points);
        flex: 0 0 calc(24px + 4vw);
        width: calc(24px + 4vw);
        height: calc(24px + 4vw);
        color: #fff;
        background: #222;
        border-radius: 50%;
        text-align: center;
        line-height: calc(24px + 4vw);
        font-size: calc(14px + 1vw);
        margin-right: calc(10px + 0.5vw);

    @media (min-width: 800px) {
        &:beforex {
            flex: 0 0 80px;
            width: 80px;
            height: 80px;
            line-height: 80px;

.c-point--1:before {
    background: #CF1A23;

.c-point--2:before {
    background: #B2171E;

.c-point--3:before {
    background: #931419;

.c-point--4:before {
    background: #750F14;

.c-point--5:before {
    background: #580B0D;

.c-point--6:before {
    background: #3A0808;

.c-point--7:before {
    background: #1D0504;

.c-point__title {
    font-size: calc(12px + 1vmin);
    color: #4d4d4d;

    @media (min-width: 800px) {
        //font-size: 24px;

.o-grid--3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(265px, 1fr));
  grid-gap: 1rem;

body {
  font-family: "Rubik";
  line-height: 1.3;
  margin: 0;
  background: #fafafa;
  padding: 2rem;

* {
  box-sizing: border-box;

.vu-watcher {
  position: fixed;
  right: 0;
  left: 0;
  bottom: 0;
  background: #222;
  display: flex;
  flex-direction: column;
  form {
    display: inline-flex;
    padding: 1rem;
    border-bottom: 1px solid rgba(#fff, 0.2);
  p {
    &:not(:last-child) {
      margin-right: 0.5rem;;
  label {
    display: block;
    color: #fff;
    font-size: 13px;
    margin-bottom: 0.25rem;
  input {
    appearance: none;
    border: 0;
    font-size: 15px;
    color: #fff;
    padding: 0.35rem 0.5rem;
    background: #4c4c4c;
    transition: background-color 0.2s ease-out;
    &:focus {
      outline: none;
      background: #fff;
      color: #222;

.vu-watcher-items {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding: 1rem;
  &:empty {
    display: none;

.vu-watcher-box {
  flex: 1;
  color: #fff;
  background: #4c4c4c;
  padding: 0.5rem 1rem;
  border-radius: 7px;
  margin-right: 1rem;
  .name {
    font-size: 13px;
    margin-bottom: 0.3rem;
    opacity: 0.8;
  .value {
    font-size: 14px;


                let elementInput = document.querySelector("#element");
let elementProperty = document.querySelector("#property");
let watchWrapper = document.querySelector(".vu-watcher-items");
let numOfBoxes = 0;
let itemsToWatch = [];

elementProperty.addEventListener("keyup", function(e) {

  if (e.keyCode == 13) {

function addTemplate() {
  var t = document.querySelector("#mytemplate");
  var clone = document.importNode(t.content, true);
  let elm = clone.querySelector('.vu-watcher-box');
  let elmName = elm.querySelector('.name');
  let elmValue = elm.querySelector('.value');
  elmName.innerHTML = elementInput.value;
  elmValue.innerHTML = elementProperty.value;
  // Get element class, property
    element: elementInput.value,
    property: elementProperty.value,
    id: numOfBoxes
  elementInput.value = "";
  elementProperty.value = "";


function checkStyle(className, property, id) {
  let elem = document.querySelector("." + className);
  let compStyles = window.getComputedStyle(elem);
  let propertyValue = compStyles.getPropertyValue(property);
  let box = document.querySelector(`.vu-watcher-box-${id}`);
  let elmValue = box.querySelector('.value');

  elmValue.innerHTML = property + ": " + propertyValue;
  console.log(property, propertyValue);

var addEvent = function(object, type, callback) {
    if (object == null || typeof(object) == 'undefined') return;
    if (object.addEventListener) {
        object.addEventListener(type, callback, false);
    } else if (object.attachEvent) {
        object.attachEvent("on" + type, callback);
    } else {
        object["on"+type] = callback;

addEvent(window, "resize", function(event) {
  // watch elements
  for(var i = 0; i < itemsToWatch.length; i++) {
    checkStyle(itemsToWatch[i].element, itemsToWatch[i].property, itemsToWatch[i].id);
    console.log("Element: " + itemsToWatch[i].element);