css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

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.

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>
<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>untitled - Paint</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" type="text/css" media="screen" href="main.css" />
    <link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet"> 
    <script defer src="https://use.fontawesome.com/releases/v5.6.3/js/all.js" integrity="sha384-EIHISlAOj4zgYieurP0SdoiBYfGJKkgWedPHH4jCzpCXLmzVsw1ouK59MuUtP4a1" crossorigin="anonymous"></script>
    <!-- Scripts and Links -->
</head>
<body>

  <div class="grid">
    <div class="upbar">
      <a class="upbar-opt" href="#">File</a>
      <a class="upbar-opt" href="#">Edit</a>
      <a class="upbar-opt" href="#">View</a>
      <a class="upbar-opt" href="#">Image</a>
      <a class="upbar-opt" href="#">Colors</a>
      <a class="upbar-opt" href="#">Help</a>
    </div>
    <div class="sidebar">
      <div id="item1" class="item"> <img src="https://i.postimg.cc/N0XtfWcz/1.png" alt=""> </div>
      <div id="item2" class="item"> <img src="https://i.postimg.cc/k4FdWKDN/2.png" alt=""> </div>
      <div id="item3" class="item"> <img src="https://i.postimg.cc/prWMCrnw/3.png" alt=""> </div>
      <div id="item4" class="item"> <img src="https://i.postimg.cc/HWzgxwqd/4.png" alt=""> </div>
      <div id="item5" class="item"> <img src="https://i.postimg.cc/SRgFv46J/5.png" alt=""> </div>
      <div id="item6" class="item"> <img src="https://i.postimg.cc/sgkF8wh9/6.png" alt=""> </div>
      <div id="item7" class="item active"> <img src="https://i.postimg.cc/bNFf0zY5/7.png" alt=""> </div>
      <div id="item8" class="item"> <img src="https://i.postimg.cc/ncLtQsx7/8.png" alt=""> </div>
      <div id="item9" class="item"> <img src="https://i.postimg.cc/0yMRcLby/9.png" alt=""> </div>
      <div id="item10" class="item"> <img src="https://i.postimg.cc/LsjdMLkd/10.png" alt=""> </div>
      <div id="item11" class="item"> <img src="https://i.postimg.cc/Y975208v/11.png" alt=""> </div>
      <div id="item12" class="item"> <img src="https://i.postimg.cc/xCPWXQFt/12.png" alt=""> </div>
      <div id="item13" class="item"> <img src="https://i.postimg.cc/8cPxWY2D/13.png" alt=""> </div>
      <div id="item14" class="item"> <img src="https://i.postimg.cc/J06vQq8X/14.png" alt=""> </div>
      <div id="item15" class="item"> <img src="https://i.postimg.cc/ryQBc84p/15.png" alt=""> </div>
      <div id="item16" class="item"> <img src="https://i.postimg.cc/GhtZmZPx/16.png" alt=""> </div>
    </div>
    <div class="canvas">
      <div class="canvas-white">
         <img src="https://i.postimg.cc/0yjRkmwy/Screen-Shot-2019-03-17-at-1-53-05-PM.png" alt="">
       </div>
    </div>
    <div class="bottombar">
      <div class="cont">
          <div class="selection">
            <div class="selected" style="background-color: black"></div>
            <div class="selected2" style="background-color: white"></div>
          </div>
          <div class="colors">
          <div class="wut colors--color1" style="background-color: rgba(0,0,0)"></div>
          <div class="wut colors--color2" style="background-color: rgb(125,125,125)"></div>
          <div class="wut colors--color3" style="background-color: rgb(120,0,0)"></div>
          <div class="wut colors--color4" style="background-color: rgb(120,120,0)"></div>
          <div class="wut colors--color5" style="background-color: rgb(0,120,0)"></div>
          <div class="wut colors--color6" style="background-color: rgb(0,0,120)"></div>
          <div class="wut colors--color7" style="background-color: rgb(120,0,120)"></div>
          <div class="wut colors--color8" style="background-color: rgb(120,120,60)"></div>
          <div class="wut colors--color9" style="background-color: rgb(0,120,60)"></div>
          <div class="wut colors--color10" style="background-color: rgb(0,60,120)"></div>
          <div class="wut colors--color11" style="background-color: rgb(0,60,60)"></div>
          <div class="wut colors--color12" style="background-color: rgb(60,120,120)"></div>
          <div class="wut colors--color13" style="background-color: rgb(60,60,120)"></div>
          <div class="wut colors--color14" style="background-color: rgb(120,60,30)"></div>
          <div class="wut colors--color15" style="background-color: rgb(255,255,255)"></div>
          <div class="wut colors--color16" style="background-color: rgb(190,190,190)"></div>
          <div class="wut colors--color17" style="background-color: rgb(255,0,0)"></div>
          <div class="wut colors--color18" style="background-color: rgb(255,255,0)"></div>
          <div class="wut colors--color19" style="background-color: rgb(0,255,0)"></div>
          <div class="wut colors--color20" style="background-color: rgb(0,0,255)"></div>
          <div class="wut colors--color21" style="background-color: rgb(255,0,255)"></div>
          <div class="wut colors--color22" style="background-color: rgb(255,255,120)"></div>
          <div class="wut colors--color23" style="background-color: rgb(0,255,120)"></div>
          <div class="wut colors--color24" style="background-color: rgb(0,120,255)"></div>
          <div class="wut colors--color25" style="background-color: rgb(0,120,120)"></div>
          <div class="wut colors--color26" style="background-color: rgb(120,255,255)"></div>
          <div class="wut colors--color27" style="background-color: rgb(120,120,255)"></div>
          <div class="wut colors--color28" style="background-color: rgb(255,120,60)"></div>
        </div>
      </div>
    </div>
    <div class="bottominfo"><div class="a">For Help, click Help Topics on the Help Menu.</div>
       <div class="b">
          <a id="name"href="https://twitter.com/Jorgert1205" target="_blank">by Jorge Reyes</a>
       </div>
     </div>
  </div>

  <!-- SCRIPT -->
  <script type="text/javascript" src="app.js"></script>
</body>
</html>
            
          
!
            
              *,
*::before,
*::after {
    padding: 0;
    margin: 0;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    font-size: .75rem;
}

.grid {
    width: 100%;
    height: 100vh;

    display: grid;

    grid-template-columns: auto 1fr;
    grid-template-rows: min-content 1fr 40px min-content;

    background-color: green;
}

.upbar {
    grid-area: 1 / 1 / 1 / -1;
    background-color: rgb(192,192,192);
    padding: .2rem;

    &-opt:link,
    &-opt:visited {
        color: black;
        text-decoration: none;
        padding: 2px;

        &:hover {
            box-shadow: 1px 1px rgba(black, 1), 
            inset -1px -1px rgba(grey, 1),
            inset 1px 1px rgba(white, 1);
        }

        &:active {
            box-shadow:  inset 1px 1px rgba(black, 1), 
            inset 2px 2px rgba(grey, 1),
            1px 1px rgba(white, 1);
        }
    }

}

.sidebar {
    grid-column: 1 / 2;
    grid-row: 2 / -1;

    background-color: rgb(192,192,192);
    padding: 0 .2rem;

    display: grid;
    grid-template-columns: repeat(2, max-content);
    grid-gap: 1px;
    
    justify-content: center;
    align-content: start;
}

.item {
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    -moz-user-select: none;

    background-color: rgb(192,192,192);
    box-shadow: 1px 1px rgba(black, 1), 
    inset -1px -1px rgba(grey, 1),
    inset 1px 1px rgba(white, 1);

    width: 23px;
    height: 23px;


}

.active {
    box-shadow:  inset 1px 1px rgba(black, 1), 
    inset 2px 2px rgba(grey, 1),
    1px 1px rgba(white, 1);

    background-image: repeating-linear-gradient(to left bottom, rgba(white, .8), rgba(white, .8) .25px, rgba(grey, .1) .25px, rgba(grey, .1) .5px);
}

.canvas {
    background-color: rgb(123,123,123);

    box-shadow: inset 1px 1px rgba(#343434, 1), inset -1px -1px rgba(grey, 1);
    padding: .3rem;

    &-white {
        background-color: white;
        width: 90%;
        height: 80%;
       display: flex;
       justify-content: center;
       align-items: center;
    }
}

.bottombar {  
    grid-area: 3 / 1 / 3 / -1;
    
    background-color: rgb(192,192,192);

    padding: .5rem .4rem .5rem .2rem;
}

.bottominfo {
    grid-area: 4 / 1 / 5 / -1;
    background-color: rgb(192,192,192);

    padding: .2rem;
    border-top: 1px solid rgba(#343434, .5);
    box-shadow: inset 0px 1px rgb(192,192,192),
    inset 0px 2px rgba(#343434, .5);
   
   display: flex;
   justify-content: space-between;
}

.selection {
    width: 30px;
    height: 30px;

    background-image: repeating-linear-gradient(to left bottom, rgba(white, .8), rgba(white, .8) 1px, rgba(rgb(172, 172, 172), .02) 1px, rgba(grey, .02) 2px);
    box-shadow:  inset 1px 1px rgba(grey, 1), 
    inset 2px 2px rgba(black, 1),
    1px 1px rgba(white, 1);
    margin-right: 2px;
    position: relative;

    .selected {
        background-color: black;
        position: absolute;
        width: 12px;
        height: 12px;
        top: 15%;
        left: 15%;
        border: 1px solid lightgray;
        box-shadow: 1px 1px rgba(#232323, 1), 1px 1px rgba(white, 1);
        z-index: 1;
       cursor: pointer;
    }

    .selected2 {
        background-color: white;
        position: absolute;
        width: 12px;
        height: 12px;
        bottom: 15%;
        right: 15%;
        border: 1px solid lightgray;
        box-shadow: 1px 1px rgba(#232323, 1), 1px 1px rgba(white, 1);
       cursor: pointer;
    }
}

.cont {
    display: flex;
    transform: translateY(-.3rem);
}

.wut {
    margin: 1px;
    box-shadow:  inset 1px 1px rgba(grey, 1), 
    inset 2px 2px rgba(black, 1),
    1px 1px rgba(white, 1);
   cursor: pointer;
}

.colors {
    display: grid;
    grid-template-columns: repeat(14, 15px);
    grid-template-rows: 15px;

    &--color1 {background-color: black;}
    &--color2 {background-color: grey;}
    &--color3 {background-color: violet;}
    &--color4 {background-color: red;}
    &--color5 {background-color: violet;}
    &--color6 {background-color: pink;}
    &--color7 {background-color: orange;}
    &--color8 {background-color: olive;}
    &--color9 {background-color: lightgreen;}
    &--color10 {background-color: burlywood;}
    &--color11 {background-color: gold;}
    &--color12 {background-color: yellowgreen;}
    &--color13 {background-color: darkcyan;}
    &--color14 {background-color: darkgoldenrod;}
    &--color15 {background-color: white;}
    &--color16 {background-color: lightgrey;}
    &--color17 {background-color: saddlebrown;}
    &--color18 {background-color: indianred;}
    &--color19 {background-color: indigo;}
    &--color20 {background-color: palegreen;}
    &--color21 {background-color: peachpuff;}
    &--color22 {background-color: peru;}
    &--color23 {background-color: coral;}
    &--color24 {background-color: cornflowerblue;}
    &--color25 {background-color: salmon;}
    &--color26 {background-color: hotpink;}
    &--color27 {background-color: khaki;}
    &--color28 {background-color: green;}
}

#name:link,
#name:visited{
   color: black;
   text-decoration: none;
}
            
          
!
            
              var item1 = document.getElementById('item1');
var item2 = document.getElementById('item2');
var item3 = document.getElementById('item3');
var item4 = document.getElementById('item4');
var item5 = document.getElementById('item5');
var item6 = document.getElementById('item6');
var item7 = document.getElementById('item7');
var item8 = document.getElementById('item8');
var item9 = document.getElementById('item9');
var item10 = document.getElementById('item10');
var item11 = document.getElementById('item11');
var item12 = document.getElementById('item12');
var item13 = document.getElementById('item13');
var item14 = document.getElementById('item14');
var item15 = document.getElementById('item15');
var item16 = document.getElementById('item16');


var items = [item1, item2, item3, item4, item5, item6, item7, item8, item9, item10, item11, item12, item13, item14, item15, item16];

item1.addEventListener('click', function(){
    for(var i = 0; i<items.length; i++) {
        items[i].classList.remove('active');
    }
    this.classList.add('active');
});
item2.addEventListener('click', function(){
    for(var i = 0; i<items.length; i++) {
        items[i].classList.remove('active');
    }
    this.classList.add('active');
});
item3.addEventListener('click', function(){
    for(var i = 0; i<items.length; i++) {
        items[i].classList.remove('active');
    }
    this.classList.add('active');
});
item4.addEventListener('click', function(){
    for(var i = 0; i<items.length; i++) {
        items[i].classList.remove('active');
    }
    this.classList.add('active');
});
item5.addEventListener('click', function(){
    for(var i = 0; i<items.length; i++) {
        items[i].classList.remove('active');
    }
    this.classList.add('active');
});
item6.addEventListener('click', function(){
    for(var i = 0; i<items.length; i++) {
        items[i].classList.remove('active');
    }
    this.classList.add('active');
});
item7.addEventListener('click', function(){
    for(var i = 0; i<items.length; i++) {
        items[i].classList.remove('active');
    }
    this.classList.add('active');
});
item8.addEventListener('click', function(){
    for(var i = 0; i<items.length; i++) {
        items[i].classList.remove('active');
    }
    this.classList.add('active');
});
item9.addEventListener('click', function(){
    for(var i = 0; i<items.length; i++) {
        items[i].classList.remove('active');
    }
    this.classList.add('active');
});
item10.addEventListener('click', function(){
    for(var i = 0; i<items.length; i++) {
        items[i].classList.remove('active');
    }
    this.classList.add('active');
});
item11.addEventListener('click', function(){
    for(var i = 0; i<items.length; i++) {
        items[i].classList.remove('active');
    }
    this.classList.add('active');
});
item12.addEventListener('click', function(){
    for(var i = 0; i<items.length; i++) {
        items[i].classList.remove('active');
    }
    this.classList.add('active');
});
item13.addEventListener('click', function(){
    for(var i = 0; i<items.length; i++) {
        items[i].classList.remove('active');
    }
    this.classList.add('active');
});
item14.addEventListener('click', function(){
    for(var i = 0; i<items.length; i++) {
        items[i].classList.remove('active');
    }
    this.classList.add('active');
});
item15.addEventListener('click', function(){
    for(var i = 0; i<items.length; i++) {
        items[i].classList.remove('active');
    }
    this.classList.add('active');
});
item16.addEventListener('click', function(){
    for(var i = 0; i<items.length; i++) {
        items[i].classList.remove('active');
    }
    this.classList.add('active');
});

// COLORS

var color1 = document.querySelector('.colors--color1');
var color2 = document.querySelector('.colors--color2');
var color3 = document.querySelector('.colors--color3');
var color4 = document.querySelector('.colors--color4');
var color5 = document.querySelector('.colors--color5');
var color6 = document.querySelector('.colors--color6');
var color7 = document.querySelector('.colors--color7');
var color8 = document.querySelector('.colors--color8');
var color9 = document.querySelector('.colors--color9');
var color10 = document.querySelector('.colors--color10');
var color11 = document.querySelector('.colors--color11');
var color12 = document.querySelector('.colors--color12');
var color13 = document.querySelector('.colors--color13');
var color14 = document.querySelector('.colors--color14');
var color15 = document.querySelector('.colors--color15');
var color16 = document.querySelector('.colors--color16');
var color17 = document.querySelector('.colors--color17');
var color18 = document.querySelector('.colors--color18');
var color19 = document.querySelector('.colors--color19');
var color20 = document.querySelector('.colors--color20');
var color21 = document.querySelector('.colors--color21');
var color22 = document.querySelector('.colors--color22');
var color23 = document.querySelector('.colors--color23');
var color24 = document.querySelector('.colors--color24');
var color25 = document.querySelector('.colors--color25');
var color26 = document.querySelector('.colors--color26');
var color27 = document.querySelector('.colors--color27');
var color28 = document.querySelector('.colors--color28');

var selected = document.querySelector('.selected');
var selected2 = document.querySelector('.selected2');

selected.addEventListener('click', function(){
    var aux = selected.style.backgroundColor;
    this.style.backgroundColor = selected2.style.backgroundColor;
    selected2.style.backgroundColor = aux;
});

selected2.addEventListener('click', function(){
    var aux = selected2.style.backgroundColor;
    this.style.backgroundColor = selected.style.backgroundColor;
    selected.style.backgroundColor = aux;
});

color1.addEventListener('click', function(){
    selected.style.backgroundColor = this.style.backgroundColor;
});
color2.addEventListener('click', function(){
    selected.style.backgroundColor = this.style.backgroundColor;
});
color3.addEventListener('click', function(){
    selected.style.backgroundColor = this.style.backgroundColor;
});
color4.addEventListener('click', function(){
    selected.style.backgroundColor = this.style.backgroundColor;
});
color5.addEventListener('click', function(){
    selected.style.backgroundColor = this.style.backgroundColor;
});
color6.addEventListener('click', function(){
    selected.style.backgroundColor = this.style.backgroundColor;
});
color7.addEventListener('click', function(){
    selected.style.backgroundColor = this.style.backgroundColor;
});
color8.addEventListener('click', function(){
    selected.style.backgroundColor = this.style.backgroundColor;
});
color9.addEventListener('click', function(){
    selected.style.backgroundColor = this.style.backgroundColor;
});
color10.addEventListener('click', function(){
    selected.style.backgroundColor = this.style.backgroundColor;
});
color11.addEventListener('click', function(){
    selected.style.backgroundColor = this.style.backgroundColor;
});
color12.addEventListener('click', function(){
    selected.style.backgroundColor = this.style.backgroundColor;
});
color13.addEventListener('click', function(){
    selected.style.backgroundColor = this.style.backgroundColor;
});
color14.addEventListener('click', function(){
    selected.style.backgroundColor = this.style.backgroundColor;
});
color15.addEventListener('click', function(){
    selected.style.backgroundColor = this.style.backgroundColor;
});
color16.addEventListener('click', function(){
    selected.style.backgroundColor = this.style.backgroundColor;
});
color17.addEventListener('click', function(){
    selected.style.backgroundColor = this.style.backgroundColor;
});
color18.addEventListener('click', function(){
    selected.style.backgroundColor = this.style.backgroundColor;
});
color19.addEventListener('click', function(){
    selected.style.backgroundColor = this.style.backgroundColor;
});
color20.addEventListener('click', function(){
    selected.style.backgroundColor = this.style.backgroundColor;
});
color21.addEventListener('click', function(){
    selected.style.backgroundColor = this.style.backgroundColor;
});
color22.addEventListener('click', function(){
    selected.style.backgroundColor = this.style.backgroundColor;
});
color23.addEventListener('click', function(){
    selected.style.backgroundColor = this.style.backgroundColor;
});
color24.addEventListener('click', function(){
    selected.style.backgroundColor = this.style.backgroundColor;
});
color25.addEventListener('click', function(){
    selected.style.backgroundColor = this.style.backgroundColor;
});
color26.addEventListener('click', function(){
    selected.style.backgroundColor = this.style.backgroundColor;
});
color27.addEventListener('click', function(){
    selected.style.backgroundColor = this.style.backgroundColor;
});
color28.addEventListener('click', function(){
    selected.style.backgroundColor = this.style.backgroundColor;
});
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console