.app-window(data-js-target-app)
  .menu
    .menu-row
      a.user(href="https://instagram.com/aris_acoba" target="_blank") aris_acoba
      .icon
        label.icon-switcher(data-js-icon-switcher)
          input.control(type="checkbox")
          .peg
          .bg
  .scroll
    .main-content
      .header-row
        .avatar
          a(href="https://www.instagram.com/aris_acoba/" target="_blank")
            .avatar-icon
              img.icon(src="https://user-images.githubusercontent.com/8143661/73124236-fc31e880-3fd3-11ea-9653-12788869491a.jpg" alt="Aris Acoba")
        .stats
          .stats-row
            .stats
              .stats-cell
                .data 30
                .label Posts
              .stats-cell
                .data 435
                .label Followers
              .stats-cell
                .data 1,315 
                .label Following
            .action
              a.btn(href="https://www.instagram.com/aris_acoba" target="_blank") Edit Profile
      .description-row
        .headline Aris Acoba
        .decription Leading product design at LawAdvisor
        a.link(href="http://arisacoba.com/" target="_blank") arisacoba.com
      .story-highlights
        .label Story Highlights
      .tabs-row
        .tab
          label.icon-grid(data-js-icon-grid)
            input.control(type="checkbox" checked)
            .icon
        .tab
          label.icon-row(data-js-icon-row)
            input.control(type="checkbox")
            .icon
        .tab
          .icon-tagged
            .avatar
      .display-tab(data-js-display-tab)
        .post(style="background-image:url(https://source.unsplash.com/800x400/?kodak)")
        .post(style="background-image:url(https://source.unsplash.com/800x400/?candle)")
        .post(style="background-image:url(https://source.unsplash.com/800x400/?setup)")
        .post(style="background-image:url(https://source.unsplash.com/800x400/?cafe)")
        .post(style="background-image:url(https://source.unsplash.com/800x400/?surf)")
        .post(style="background-image:url(https://source.unsplash.com/800x400/?film)")
        .post(style="background-image:url(https://source.unsplash.com/800x400/?melbourne)")
        .post(style="background-image:url(https://source.unsplash.com/800x400/?mountains)")
        .post(style="background-image:url(https://source.unsplash.com/800x400/?plants)")
View Compiled
$background: #CBCFD2;
$brand-a: #FA9F4C;
$brand-b: #C52F91;

$bg-light: #fff;
$bg-dark: #292b36;
$sun: #ffd712;

$width: 360px;
$height: 669px;
$post-sm: 223px;
$mobile: 420px;

$text-body: #262626;
$text-muted: #999999; 
$text-link: #001d56;
$text-link-4: #3D95EB;

$line: #dadada;
$line-muted: #dbdbdb;
$line-light: #595959;
$icon-line: 2px solid $text-muted;
$icon-active: #3D95EB;
$icon-line-active: 2px solid $icon-active;
$font-body: -apple-system, BlinkMacSystemFont, "Segoe UI",Roboto,Oxygen-Sans, Ubuntu,Cantarell,"Helvetica Neue",sans-serif;

@mixin flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
}
@keyframes rotate {
  100% { transform: rotate(360deg); }
}

html{
  box-sizing: border-box;
}

*,*::after, *::before{
  box-sizing: inherit;
}

html,body{
  height: 100%;
}

body{
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  background: $background;
  font-family: $font-body;
  font-size: 12px;
  color: $text-body;
}

a { text-decoration: none; }

.btn {
  border: none;
  padding: 6px;
  width: 100%;
  display: inline-block;
  text-align: center;
  color: $text-body;
  border-radius: 4px;
  font-weight: 500;
  border: 1px solid $line-muted;
  background-color: transparent;
}

.app-window {
  width: $width;
  max-height: $height;
  background-color: $bg-light;
  display: flex;
  flex-direction: column;
  transform: scale(0.9);
  > .menu {
    flex-growth: 0;
  }
  > .scroll {
    overflow-y: auto;
    overflow: -moz-scrollbars-none;
    -ms-overflow-style: none;
    &::-webkit-scrollbar { width: 0; }
  }
}

.menu-row {
  padding: 16px 18px;
  border-bottom: 1.5px solid $line;
  background-color: #fafafa;
  display: flex;
  > .user {
    font-size: 1.3em;
    color: initial;
    flex-grow: 1;
    &::after {
      content: '';
      display: inline-block;
      height: 6px;
      width: 6px;
      margin-left: 8px;
      transform: rotate(45deg) translateY(-4px);
      border-right: 1.4px solid $text-body;
      border-bottom: 1.4px solid $text-body;
    }
  }
  > .icon {
    flex-grow: 0;
  }
}

.header-row {
  display: flex;
  padding-top: 18px;
  padding-left: 18px;
  padding-right: 18px;
  > .avatar {
    margin-right: 20px;
  }
  > .stats { flex: 1; }
}

.avatar-icon {
  display: flex;
  align-items: center;
  justify-content:center;
  width: 84px;
  height: 84px;
  background-image: linear-gradient(40deg, $brand-a, $brand-b);
  border-radius: 50%;
  > .icon {
    width: 96%;
    height: 96%;
    border-radius: 50%;
    border: 2px solid #fff;
    background-image: linear-gradient(40deg, $brand-a, $brand-b);
  }
}

.stats-row {
  display: flex;
  flex-direction: column;
  > .stats {
    display: flex; 
    justify-content: space-around;
    margin-bottom: 8px;
  }
  > .action {
    > button { width: 100%; }
  }
}

.stats-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  > .data { font-weight: 500; font-size: 1.4em; margin-bottom: 4px; }
  > .label { color: $text-muted; font-weight: 300; letter-spacing: 0.1px; }
}

.description-row {
  padding: 18px;
  border-bottom: 1px solid $line-muted;
  > .headline { font-weight: 600; }
  > .link { color: $text-link; margin-top: 2px; }
}

.story-highlights {
  padding: 12px 18px;
  border-bottom: 0.1px solid $line-muted;
  > .label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
    flex-grow: 1;
    &::after {
      content: '';
      display: inline-block;
      height: 8px;
      width: 8px;
      margin-left: 8px;
      transform: rotate(45deg) translateY(-4px);
      border-right: 1.4px solid $text-body;
      border-bottom: 1.4px solid $text-body;
    }
  }
}

.tabs-row {
  display: flex;
  justify-content: space-around;
  padding: 12px 18px;
  border-bottom: 0.5px solid $line-muted;
}

.icon-grid {
  user-select: none;
  cursor: pointer;
  > .control {
    display: none;
  }
  > .icon {
    height: 22px;
    width: 22px;
    border-radius: 2px;
    border: $icon-line-active;
    position: relative;
    @include flex-center;

    &::before {
      content: '';
      position: absolute;
      display: inline-block;
      width: 8px;
      height: 100%;
      border-left: $icon-line-active;
      border-right: $icon-line-active;
    }
    &::after {
      content: '';
      position: absolute;
      display: inline-block;
      width: 100%;
      height: 8px;
      border-top: $icon-line-active;
      border-bottom: $icon-line-active;
    }
  }
  
  &[data-state="active"] {
    > .icon { 
      border-color: $icon-active;
      &::before { border-left-color: $icon-active; border-right-color: $icon-active; }
      &::after { border-top-color: $icon-active; border-bottom-color: $icon-active; }
    }
  }
  &[data-state="muted"] {
    > .icon { 
      border-color: $text-muted;
      &::before { border-left-color: $text-muted; border-right-color: $text-muted; }
      &::after { border-top-color: $text-muted; border-bottom-color: $text-muted; }
    }
  }
}

.icon-row {
  user-select: none;
  cursor: pointer;
  > .icon {
    width: 20px;
    height: 22px;
    border-top: $icon-line;
    border-bottom: $icon-line; 
    @include flex-center;

    &::before {
      content: '';
      display: inline-block;
      width: 100%;
      height: 16px;
      border: $icon-line;
    }
  }
  > .control {
    display: none;
  }
  
  &[data-state="active"] {
    > .icon {
      border-top-color: $icon-active;
      border-bottom-color: $icon-active;
      &::before { border-color: $icon-active; }
    }
  }
  &[data-state="muted"] {
    > .icon {
      border-top-color: $text-muted;
      border-bottom-color: $text-muted;
      &::before { border-color: $text-muted; }
    }
  }
}

.icon-tagged {
  width: 20px;
  height: 18px;
  border-radius: 3px;
  border: $icon-line;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  &::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 50%;
    width: 4px;
    height: 4px;
    background-color: #fff;
    border-top: $icon-line;
    border-left: $icon-line;
    transform: rotate(45deg) translateX(-64%);
  }
  
  > .avatar {
    width: 12px;
    height: 4px;
    border-left: $icon-line;
    border-top: $icon-line;
    border-right: $icon-line;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    position: relative;
    
    &::before {
      content: '';
      position: absolute;
      top: -11px;
      width: 8px;
      height: 8px;
      border-radius: 50%;
      border: $icon-line;
    }
  }
}

.display-tab {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  > .post {
    width: 33.33%;
    height: 120px;
    background-size: cover;
    background-repeat:no-repeat;
    background-position: center center;
    background-color: $line-muted;
    border-right: 2px solid #fff;
    margin-top: 2px;
    &:nth-child(3n) { border-right: 0; }
  }
  &[data-post="full"] {
    > .post {
      width: 100%;
      border-right: 0;
      height: $width;
    }
  }
}

.icon-switcher {
  width: 50px;
  height: 24px;
  position: relative;
  cursor: pointer;
  user-select: none;
  > .control {
    display: none;
    & + .peg {
      display: inline-block;
      position: absolute;
      z-index: 4;
      top: 0;
      left: 0;
      width: 24px;
      height: 24px;
      border-radius: 50%;
      border: 1px solid $text-muted;
      transition: 0.2s;
      background-color: #fff;
    }
    & ~ .bg {
      border-radius: 12px;
      width: 100%;
      height: 100%;
      border: 1px solid $text-muted;
      background-color: #fff;
      position: relative;
      z-index: 0;
      display: flex;
      align-items: center;
      overflow: hidden;
      &::before {
        content: '';
        position: absolute;
        left: calc(100% - 20px);
        display: inline-block;
        width: 16px;
        height: 16px;
        border-radius: 50%;
        background-color: $text-body;
        transition: 0.2s ease-out;
      }
      &::after {
        content: '';
        position: absolute;
        left: calc(100% - 14px);
        top: -1px;
        display: inline-block;
        width: 16px;
        height: 16px;
        border-radius: 50%;
        background-color: #fff;
        transition: 0.2s ease-out; 
      }
    }
    &:checked {
      & + .peg {
        left: calc(100% - 24px);
      }
      & ~ .bg {
        background-color: $text-body;
        &::before {
          left: 6px;
          width: 14px;
          height: 14px;
          background-color: $sun;
          filter: blur(4px);
        }
        &::after {
          background-color: $sun;
          width: 12px;
          height: 12px;
          top: initial;
          left: 8px;
        }
      }
    }
  }
}

body {
  &[data-theme="dark"] {
    color: #fff;
    
    .btn { color: #fff; }
    .app-window { background-color: $bg-dark; }
    .menu-row {
      border-bottom-color: $line-light;
      background-color: $bg-dark;
      > .user { 
        color: #fff; 
        &::after {
          border-right-color: $line;
          border-bottom-color: $line;
        }
      }
    }
    .avatar-icon { > .icon { border-color: $bg-dark; } }
    .description-row { border-bottom-color: $line-light; > .link { color: $text-link-4; }}
    .story-highlights { 
      border-bottom-color: $line-light;
      > .label {
        &::after {
          border-right-color: $line;
          border-bottom-color: $line;
        }
      }
    }
    .icon-tagged { &::before{ background-color: $bg-dark; } }
    .display-tab{ > .post{ border-right-color: $bg-dark; } }
  }
}

@media (max-width: $mobile) {
  .app-window {
    width: 100vw;
    max-height: 100%;
    transform: scale(1);
  }
}
View Compiled
const $body = document.body;
const $iconSwitcher = document.querySelector('[data-js-icon-switcher]');
const $iconRow = document.querySelector('[data-js-icon-row]');
const $displayTab = document.querySelector('[data-js-display-tab]');
const $iconGrid = document.querySelector('[data-js-icon-grid]');

$iconSwitcher.addEventListener('change', function(event){
  (event.target.checked) ? $body.setAttribute('data-theme', 'dark') : $body.removeAttribute('data-theme');
});

$iconRow.addEventListener('change', function(event){
  $displayTab.setAttribute('data-post', 'full');
  $iconGrid.setAttribute('data-state', 'muted');
  $iconRow.setAttribute('data-state', 'active');
});

$iconGrid.addEventListener('change', function(event){
  $displayTab.removeAttribute('data-post');
  $iconGrid.setAttribute('data-state', 'active');
  $iconRow.setAttribute('data-state', 'muted');
});
Run Pen

External CSS

  1. https://cdnjs.cloudflare.com/ajax/libs/sanitize.css/2.0.0/sanitize.min.css

External JavaScript

This Pen doesn't use any external JavaScript resources.