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

Auto Save

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

              
                <!-- You can zoom with scroll -->
<div id="wall" class="wall">

  <div class="wall-rain-shield"></div>

  <div id="wall-half-vertical-tiles">
    <div class="left-shadow"></div>
  </div>

  <div id="wall-masonry-vertical-tiles">
    <div class="left-shadow"></div>
  </div>

  <div id="wall-half-horizontal-tiles">
    <div class="left-shadow"></div>
  </div>

  <div id="wall-single-horizontal-tiles">
    <div class="left-shadow"></div>
  </div>

  <div id="wall-front-tiles">
    <div class="left-shadow"></div>

    <div class="window">
      <div class="left-shadow"></div>
      <div class="room">
        <img class="room-photo" src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/25387/abigail-keenan-l2JpNQF_qDc-unsplash.jpg" alt="Apartment room" />
      </div>
      <div class="window-reflection-container">
        <img class="window-reflection" src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/25387/frederick-tubiermont-mfDhj3o8LoI-unsplash.jpg" alt="Photo of a street with trees" />
      </div>
      <div class="window-frame"></div>
    </div>

    <div class="ventilation-grid"></div>

    <div class="street-signs">
      <p class="street-sign fin">puistokatu</p>
      <p class="street-sign swe">parkgatan</p>
    </div>
  </div>
</div>


<details id="settings" class="settings">
  <summary class="settings-label" aria-label="settings">
    <svg class="settings-icon" role="img" alt="settings icon">
      <use xlink:href="#settings-icon"></use>
    </svg>
  </summary>
  <ul class="settings-list">
    <li class="settings-item">
      <label>
        Shadows <input type="checkbox" id="sets-shadow" checked />
      </label>
    </li>
    <li class="settings-item">
      <label>
        3D Transformations <input type="checkbox" id="sets-3d-transformations" checked />
      </label>
    </li>
    <li class="settings-item">
      <label>
        Window Reflection <input type="checkbox" id="sets-win-reflection" checked />
      </label>
    </li>
  </ul>
</details>

<div class="loading-overlay">
  <span class="loading-message" aria-label="loading"></span>
</div>

<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
  <symbol id="settings-icon" viewBox="0 0 30 30">
    <path fill="currentColor" d="M27 14h-.172c-.478 0-.904-.337-.98-.809-.037-.229-.081-.456-.132-.68-.106-.464.158-.933.597-1.115l.156-.065c.51-.211.753-.796.541-1.307-.211-.51-.796-.753-1.307-.541l-.16.066c-.441.183-.961.035-1.214-.37-.122-.196-.25-.388-.384-.576-.277-.388-.213-.924.124-1.261l.122-.122c.391-.391.391-1.024 0-1.414-.391-.391-1.024-.391-1.414 0l-.121.124c-.337.337-.873.401-1.261.124-.188-.134-.38-.262-.576-.384-.405-.252-.553-.773-.37-1.214l.066-.16c.211-.51-.031-1.095-.541-1.307-.51-.211-1.095.031-1.307.541l-.065.156c-.182.439-.651.703-1.115.597-.224-.051-.451-.095-.68-.132-.47-.075-.807-.501-.807-.979V3c0-.552-.448-1-1-1s-1 .448-1 1v.172c0 .478-.337.904-.809.98-.229.037-.456.081-.68.132-.464.106-.933-.158-1.115-.597l-.065-.156c-.211-.51-.796-.753-1.307-.541-.51.211-.753.796-.541 1.307l.066.16c.184.44.037.961-.369 1.213-.196.122-.388.25-.575.383-.388.277-.924.214-1.261-.123l-.122-.122c-.391-.391-1.024-.391-1.414 0-.39.391-.39 1.024 0 1.414l.122.122c.337.337.4.872.123 1.261-.133.187-.261.379-.383.575-.252.406-.773.553-1.214.37l-.16-.066c-.51-.211-1.095.031-1.307.541-.211.51.031 1.095.541 1.307l.156.065c.439.182.703.651.597 1.115-.051.224-.095.451-.132.68-.075.471-.501.808-.979.808H3c-.552 0-1 .448-1 1s.448 1 1 1h.172c.478 0 .904.337.98.809.037.229.081.456.132.68.106.464-.158.933-.597 1.115l-.156.065c-.51.211-.753.796-.541 1.307.211.51.796.753 1.307.541l.16-.066c.441-.183.961-.035 1.214.37.122.196.25.388.384.576.277.388.213.924-.124 1.261l-.122.122c-.391.391-.391 1.024 0 1.414s1.024.391 1.414 0l.122-.122c.337-.337.873-.401 1.261-.124.188.134.38.262.576.384.405.252.553.773.37 1.214l-.066.16c-.211.51.031 1.095.541 1.307.51.211 1.095-.031 1.307-.541l.065-.156c.182-.439.651-.703 1.115-.597.224.051.451.095.68.132.469.073.806.499.806.977V27c0 .552.448 1 1 1s1-.448 1-1v-.172c0-.478.337-.904.809-.98.229-.037.456-.081.68-.132.464-.106.933.158 1.115.597l.065.156c.211.51.796.753 1.307.541.51-.211.753-.796.541-1.307l-.066-.16c-.183-.441-.035-.961.37-1.214.196-.122.388-.25.576-.384.388-.277.924-.213 1.261.124l.122.122c.391.391 1.024.391 1.414 0s.391-1.024 0-1.414l-.122-.122c-.337-.337-.401-.873-.124-1.261.134-.188.262-.38.384-.576.252-.405.773-.553 1.214-.37l.16.066c.51.211 1.095-.031 1.307-.541.211-.51-.031-1.095-.541-1.307l-.156-.065c-.439-.182-.703-.651-.597-1.115.051-.224.095-.451.132-.68.073-.469.499-.806.977-.806H27c.552 0 1-.448 1-1s-.448-1-1-1zm-12 9c-4.418 0-8-3.582-8-8s3.582-8 8-8 8 3.582 8 8-3.582 8-8 8z"/>
    <path fill="currentColor" d="M15 14h9v2h-9z"/>
    <path fill="currentColor" d="M11.3662 6.7056l4.5 7.794-1.732 1-4.5-7.794z"/>
    <path fill="currentColor" d="M16.11615 15.06655l-4.75 8.227-1.732-1 4.75-8.227z"/>
    <circle fill="currentColor" cx="15" cy="15" r="2"/>
  </symbol>
</svg>
              
            
!

CSS

              
                @font-face {
    font-family: 'VenturisSansADFLt-Bold';
    src:url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/25387/VenturisSansADFLt-Bold.ttf.woff') format('woff'),
        url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/25387/VenturisSansADFLt-Bold.ttf.svg#VenturisSansADFLt-Bold') format('svg'),
        url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/25387/VenturisSansADFLt-Bold.ttf.eot'),
        url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/25387/VenturisSansADFLt-Bold.ttf.eot?#iefix') format('embedded-opentype'); 
    font-weight: normal;
    font-style: normal;
}

:root {
  --zoom: 1; // updated by mousewheel
  --zoom-square: calc( var(--zoom) * var(--zoom) );
  --camera-x: 0; // updated by mousemove
  --camera-y: 0; // updated by mousemove
  --row-count: 0; // will be set from JS
  --col-count: 0; // will be set from JS
  --tile-width: 1em;
  --gap-width: calc(var(--tile-width) * 5 / 100);
  --total-tile-width: calc(1em + var(--gap-width));
  --gap-color: #666;
}

@function tile($n) {
  @return calc(#{$n} * var(--tile-width));
}

@function totalTile($n) {
  @return calc(#{$n} * var(--total-tile-width));
}

body {
  height: 100vh;
  display: grid;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  font-size: 7vmin;
  perspective: 150vmin;
  background: lighten(cadetblue, 35%);
}

.loading-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(#fff, .85);
}

.has-loaded .loading-overlay {
  display: none;
}

.loading-message {
  font-size: 3rem;

  &::after {
    content: "✨";
    animation: loading-message .5s infinite;
  }
}

@keyframes loading-message {
  from, to {
    content: "Loading ✨";
  }
  33% {
    content: "Loading 🍓";
  }
  66% {
    content: "Loading ⚡️";
  }
}

.tile {
  width: tile(1);
  height: tile(1);
  display: grid;
  gap: var(--gap-width);
  background: var(--gap-color);
}

.enable-shadows .tile span {
  $light-shadow-pos: tile(.02) tile(.02) tile(.06);
  $dark-shadow-pos: tile(-.02) tile(-.02) tile(.08);
  box-shadow:
    inset $light-shadow-pos rgba(255, 200, 50, .25),
    inset $dark-shadow-pos rgba(30, 10, 0, .5);
}

.tile.half-vertical {
  width: tile(.3);
  height: tile(.4);
}

.tile.masonry-vertical {
  grid-template: .6fr 1.4fr / 1fr;
  width: tile(.3);

  &.odd {
    grid-template: 1.4fr .6fr / 1fr;
  }
}

.tile.half-horizontal {
  width: tile(.475);
  height: tile(.33);
}

.tile.single-horizontal {
  height: tile(.33);
}

.tile.vertical {
  grid-template: 1fr / repeat(3, 1fr);
}

.tile.horizontal {
  grid-template: repeat(3, 1fr) / 1fr 1fr;

  :first-child {
    grid-area: 1 / span 2;
  }

  :last-child {
    grid-area: 3 / span 2;
  }
}

.wall {
  position: relative;
  background: var(--gap-color);
  transform-style: preserve-3d;
  transform:
    rotateX( calc(var(--camera-y) * -15deg) )
    rotateY( calc(var(--camera-x) * 15deg) )
    scale( calc(var(--zoom)) );
  will-change: transform;
}

.wall-rain-shield {
  position: absolute;
  top: tile(-.26);
  left: 0;
  z-index: 5;
  width: 100%;
  height: tile(.4);
  background: #bbb;
}

.enable-3d-transformations .wall-rain-shield {
  transform-origin: top center;
  transform:
    translateZ(tile(.6))
    rotateX(30deg);
}

#wall-half-vertical-tiles {
  position: relative;
  z-index: 4;
  display: grid;
  gap: var(--gap-width);
  grid-template: 1fr / repeat(calc(3 * var(--col-count)), 1fr);
  background: var(--gap-color);
}

.enable-shadows #wall-half-vertical-tiles {
  box-shadow: 0 tile(.25) tile(.1) rgba(#000, .5);

  // Shadow of rain shield ¯\_(ツ)_/¯
  &::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    box-shadow:  inset 0 tile(.2) tile(.1) rgba(#000, .5),
  }
}

.enable-3d-transformations #wall-half-vertical-tiles {
  transform: translateZ(tile(.6));
}

#wall-masonry-vertical-tiles {
  position: relative;
  z-index: 3;
  display: grid;
  gap: var(--gap-width);
  grid-template: 1fr / repeat(calc(3 * var(--col-count)), 1fr);
}

.enable-shadows #wall-masonry-vertical-tiles {
  box-shadow: 0 tile(.25) tile(.1) rgba(#000, .5);
}

.enable-3d-transformations #wall-masonry-vertical-tiles {
  transform: translateZ(tile(.45));
}

#wall-half-horizontal-tiles {
  position: relative;
  z-index: 2;
  display: grid;
  gap: var(--gap-width);
  grid-template: 1fr / repeat(calc(2 * var(--col-count)), 1fr);
}

.enable-shadows #wall-half-horizontal-tiles {
  box-shadow: 0 tile(.25) tile(.1) rgba(#000, .5);
}

.enable-3d-transformations #wall-half-horizontal-tiles {
  transform: translateZ(tile(.3));
}

#wall-single-horizontal-tiles {
  position: relative;
  z-index: 1;
  display: grid;
  gap: var(--gap-width);
  grid-template: 1fr / repeat(var(--col-count), 1fr);
}

.enable-shadows #wall-single-horizontal-tiles {
  box-shadow: 0 tile(.25) tile(.1) rgba(#000, .5);
}

.enable-3d-transformations #wall-single-horizontal-tiles {
  transform: translateZ(tile(.15));
}

#wall-front-tiles {
  position: relative;
  display: grid;
  gap: var(--gap-width);
  grid-template:
    repeat(var(--row-count), 1fr) /
    repeat(var(--col-count), 1fr);
}

.left-shadow {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  box-shadow: inset tile(1.65) 0 tile(.08) rgba(#000, .5);
  transform: translateZ(1px);
}

.enable-shadows .left-shadow {
  display: block;
}

.window {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: totalTile(5);
  height: totalTile(6);
  overflow: hidden;
  background: rgba(darken(desaturate(skyblue, 40%), 60%), .5);
  perspective: 150vmin;

  .left-shadow {
    left: tile(-1.5);
  }
}

.room {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 100%;
}

.room-photo {
  position: absolute;
  top: tile(-2);
  left: tile(-3);
  max-width: 300%;
  opacity: 1;
  transform:
    translate(
      calc(var(--camera-x) * -1% * var(--zoom-square)),
      calc(var(--camera-y) * -1% * var(--zoom-square))
    )
    scale( calc( 3 - var(--zoom) ) );
  will-change: transform;
}

.enable-win-reflection .room-photo {
  opacity: calc(var(--zoom) / 2);
  will-change: opacity;
}

.window-reflection-container {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
}

.window-reflection {
  display: none;
  position: absolute;
  top: tile(-8.5);
  right: tile(0);
  max-width: calc(600% - (150% * var(--zoom)));
  mix-blend-mode: overlay;
  transform:
    translate(
      calc(var(--camera-x) * -3% * var(--zoom-square) / 1.5),
      calc(var(--camera-y) * -3% * var(--zoom-square) / 1.5)
    );
  will-change: max-width, transform;
}

.enable-win-reflection .window-reflection {
  display: block;
}

.window-frame {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  box-shadow:
    inset 0 0 0 tile(.25) #eae4da,
    inset tile(.01) tile(.01) 0 tile(.255) rgba(#000, .5),
    inset 0 0 0 tile(.5) #eae4da,
    inset 0 0 0 tile(.6) darken(desaturate(orange, 55%), 15%);
}

.ventilation-grid {
  position: absolute;
  top: 0;
  right: tile(1.2);
  width: tile(.8);
  height: tile(.8);
  background: #777;

  &::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80%;
    height: 80%;
    transform: translate(-50%, -50%);
    background: repeating-linear-gradient(
      to bottom,
      rgba(#000, .8),
      transparent tile(.1),
      transparent tile(.14)
    );
  }
}

.street-signs {
  position: absolute;
  left: tile(.5);
  bottom: tile(1);
  height: tile(.5);
}

.street-sign {
  position: relative;
  padding: tile(.25) tile(.3);
  background: linear-gradient(to bottom, #eae4da, #dad4ca);
  font: normal tile(.4)/tile(.6) 'VenturisSansADFLt-Bold', sans-serif;
  text-transform: uppercase;
  box-shadow: tile(.02) tile(.02) 2px rgba(#000, .5);

  &::before, &::after {
    content: "";
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: tile(.15);
    height: tile(.15);
    background: #333;
    border-radius: 100%;
  }

  &::before {
    left: tile(.01);
  }

  &::after {
    right: tile(.01);
  }

  &.swe {
    letter-spacing: tile(.06);
  }
}

.settings {
  position: absolute;
  top: 1rem;
  left: 1rem;
  font: normal 1rem/1.6 helvetica, sans-serif;

  &.inverted {
    color: white;
  }

  &[open] {
    background: rgba(#000, .9);
    color: white;
  }

  &[open] &-label::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    z-index: 1;
  }

  &-label {
    display: block;
    width: 28px;
    height: 28px;
    padding: .3rem .5rem;
    user-select: none;
    list-style: none;

    &::-webkit-details-marker {
      display: none;
    }
  }

  .settings-icon {
    width: 100%;
    height: 100%;
    transform: none;
    transition: transform .3s;
  }

  &[open] .settings-icon {
    animation: spin120 .5s 1 forwards;
  }

  @keyframes spin120 {
    to {
      transform: rotate(120deg);
    }
  }

  &:not([open]) .settings-icon:hover,
  &:not([open]) .settings-label:focus-within .settings-icon {
    transform: rotate(30deg);
  }

  &:not([open]) .settings-label:active .settings-icon {
    transform: rotate(45deg);
  }

  &-list {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 2;
    width: max-content;
    height: max-content;
    padding: .25rem 0;
    background: rgba(#000, .9);
  }

  &-item label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .25rem .75rem;
    line-height: 1.8;

    &:hover {
      background: rgba(#fff, .1);
    }

    input[type="checkbox"] {
      margin-left: .5rem;
    }
  }
}
              
            
!

JS

              
                const query = document.querySelector.bind(document)
const queryAll = document.querySelectorAll.bind(document)
const { random, max, min, abs } = Math

const nArray = n => [...Array(n).keys()]

const setCSSProperty = (key, value) => {
  document.documentElement.style.setProperty(key, value)
}

const elementCreatorFromHTML = () => {
  var el = document.createElement('div')
  return html => {
    el.innerHTML = html
    return el.firstElementChild
  }
}
const createElementFromHTML = elementCreatorFromHTML()

const setRandomBrickColor = element => {
  const darkCent = 12.5 + random() * 12.5
  const lightCent = 22.5 + random() * 22.5
  const hsla = [
    5 + random() * 10,
    `${ 25 + random() * 10 }%`,
    `${ random() >= .1 ? lightCent : darkCent }%`,
    1
  ]
  element.style.cssText += `
    background-color: hsla(${hsla.join(',')})
  `
  return element
}

const templates = {
  halfVertical() {
    return `
      <div class="tile half-vertical">
        <span></span>
      </div>
    `
  },

  masonryVertical({ isAlternate } = { isAlternate: false }) {
    return `
      <div class="tile masonry-vertical ${isAlternate ? 'odd' : 'even'}">
        <span></span>
        <span></span>
      </div>
    `
  },

  halfHorizontal() {
    return `
      <div class="tile half-horizontal">
        <span></span>
      </div>
    `
  },

  singleHorizontal() {
    return `
      <div class="tile single-horizontal">
        <span></span>
      </div>
    `
  },

  horizontal() {
    return `
      <div class="tile horizontal">
        <span></span>
        <span></span>
        <span></span>
        <span></span>
      </div>
    `
  },

  vertical() {
    return `
      <div class="tile vertical">
        <span></span>
        <span></span>
        <span></span>
      </div>
    `
  }
}

const rowCount = 8
const colCount = 13
const totalTileCount = rowCount * colCount
setCSSProperty('--row-count', rowCount)
setCSSProperty('--col-count', colCount)

window.addEventListener('mousemove', event => {
  var { innerWidth, innerHeight } = window
  var { clientX, clientY } = event
  var relativeX = .5 - clientX / innerWidth
  var relativeY = .5 - clientY / innerHeight
  setCSSProperty('--camera-x', relativeX) 
  setCSSProperty('--camera-y', relativeY) 
})

const animateZoom = (newDelta) => {
  window.totalZoomChange += ((newDelta - window.totalZoomChange) / 5)
  const zoomLevel = window.totalZoomChange / 1000
  setCSSProperty('--zoom', zoomLevel + 1) 
  if (newDelta - window.totalZoomChange > .1) {
    window.zoomAnimationFrame = requestAnimationFrame(() => {
      animateZoom(newDelta)
    })
  }
}

window.zoomAnimationFrame = null
window.totalZoomChange = 0
window.addEventListener('wheel', event => {
  const { wheelDeltaY, deltaY } = event
  const changeAmount = wheelDeltaY || deltaY * -50
  const newDelta = max(0, min(1000, window.totalZoomChange + changeAmount))
  cancelAnimationFrame(window.zoomAnimationFrame)
  animateZoom(newDelta)
})

const renderTiles = ({ targetEl, templateFn, tileCount }) => {
  const html = nArray(tileCount).map(i => {
    const template = templateFn(i)
    const tile = createElementFromHTML(template)
    tile.querySelectorAll('span').forEach(setRandomBrickColor)
    return tile.outerHTML
  }).join('')
  targetEl.innerHTML += html
}

renderTiles({
  targetEl: query('#wall-front-tiles'),
  tileCount: totalTileCount,
  templateFn: i => (
    i % 2 ? templates.horizontal() : templates.vertical()
  )
})

renderTiles({
  targetEl: query('#wall-single-horizontal-tiles'),
  tileCount: colCount,
  templateFn: templates.singleHorizontal
})

renderTiles({
  targetEl: query('#wall-half-horizontal-tiles'),
  tileCount: colCount * 2,
  templateFn: templates.halfHorizontal
})

renderTiles({
  targetEl: query('#wall-masonry-vertical-tiles'),
  tileCount: colCount * 3,
  templateFn: i => (
    templates.masonryVertical({
      isAlternate: !!(i % 2)
    })
  )
})

renderTiles({
  targetEl: query('#wall-half-vertical-tiles'),
  tileCount: colCount * 3,
  templateFn: templates.halfVertical
})

// Settings

const Settings = {
  shadow: {
    className: 'enable-shadows',
    element: query('#sets-shadow'),
    enabledByDefault: true
  },

  transformation: {
    className: 'enable-3d-transformations',
    element: query('#sets-3d-transformations'),
    enabledByDefault: true
  },

  reflection: {
    className: 'enable-win-reflection',
    element: query('#sets-win-reflection'),
    enabledByDefault: true
  }
}

Object.keys(Settings).forEach(key => {
  const options = Settings[key]
  if (options.enabledByDefault) {
    document.body.classList.add(options.className)
  }
  options.element.addEventListener('change', () => {
    document.body.classList.toggle(options.className)
  })
})

function manageSettingsColor() {
  requestAnimationFrame(() => {
    const settingsLeft = $settings.offsetLeft
    const settingsTop = $settings.offsetTop
    const wallRect = $wall.getBoundingClientRect()
    const wallLeft = wallRect.left
    const wallTop = wallRect.top
    const bufferSize = 30
    const isInverted = $settings.classList.contains('inverted')
    const isLeftEnough = settingsLeft > wallLeft - bufferSize
    const isTopEnough = settingsTop > wallTop - bufferSize
    if (isLeftEnough && isTopEnough) {
      if (!isInverted) {
        $settings.classList.add('inverted')
      }
    } else if (isInverted) {
        $settings.classList.remove('inverted')
    }
  })
}

const $settings = query('#settings')
const $wall = query('#wall')
window.addEventListener('wheel', manageSettingsColor)
window.addEventListener('resize', manageSettingsColor)
window.addEventListener('orientationchange', manageSettingsColor)

window.addEventListener('DOMContentLoaded', () => {
  setTimeout(() => {
    document.body.classList.add('has-loaded')
  }, 1200)
})
              
            
!
999px

Console