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

              
                section.nav
  ul.tabs
    li.tabs__item
      a(class="tabs__brand")
        i.fas.fa-database
        | DATA
    li.tabs__item#profile__item
      label(for="profile", class="tabs__label")
        i.fas.fa-user
        | Profile
    li.tabs__item#account__item
      label(for="account", class="tabs__label")
        i.fas.fa-user-cog
        | Account
    li.tabs__item#settings__item
      label(for="settings", class="tabs__label")
        i.fas.fa-cog
        | Settings
  input(type="radio", name="tab", id="profile", class="tabs__input", checked)
  article.article#profile
      button.article__btn--edit
        i.fas.fa-pen
        | Edit
      picture.article__picture
        img(src="https://i.pravatar.cc/400", alt="user avatar", class="article__avatar")
        i.fas.fa-camera.article__icon
      section.article__body.data
        p <span class="data__item">Name: </span> John
        p <span class="data__item">Lastname: </span> Doe
        p <span class="data__item">age: </span> 27
      section.article__body.data
        p <span class="data__item">E-mail: </span> contact@johndoe.com
        p <span class="data__item">web: </span> johndoe.com
      section.article__body.data.data--details
        p Lorem ipsum dolor sit amet consectetur adipisicing elit. Pariatur illo aliquam consequatur beatae fuga eius perspiciatis, saepe optio velit? Reiciendis optio numquam illum quaerat consequatur consectetur quasi perspiciatis, ipsam ea laboriosam, minus recusandae eos exercitationem voluptatum autem, nam ullam.
  input(type="radio", name="tab", id="account", class="tabs__input")
  article.article#account
    section.article__body.data
      p <span class="data__item"><i class="fas fa-user-circle"></i> Username: </span> johndoe222 
        a.data__edit
          i.fas.fa-external-link-alt
      p <span class="data__item"><i class="fas fa-blog"></i> Blog: </span> blog.johndoe.com 
        a.data__edit
          i.fas.fa-external-link-alt
      p <span class="data__item"><i class="far fa-newspaper"></i> Articles: </span> 22 
        a.data__edit
          i.fas.fa-external-link-alt
    section.article__body.data
      p <span class="data__item"><i class="fas fa-file"></i> Drafts: </span> 2 
        a.data__edit
          i.fas.fa-external-link-alt
      p <span class="data__item"><i class="fas fa-bell"></i> Notifications: </span> 0 
        a.data__edit
          i.fas.fa-external-link-alt
      p <span class="data__item"><i class="fas fa-file-code"></i> Pages: </span> 0 
        a.data__edit
          i.fas.fa-external-link-alt
  input(type="radio", name="tab", id="settings", class="tabs__input")
  article.article#settings
    section.article__body.data
      ul
        li.data__item.data__item--settings
          i.fas.fa-cog 
          |  General
        li.data__item.data__item--settings
          i.fas.fa-palette
          |  Appareace
        li.data__item.data__item--settings
          i.fas.fa-bars
          |  Navbar
    section.article__body.data
      ul
        li.data__item.data__item--settings
          i.fas.fa-chart-line
          |  Analystc
        li.data__item.data__item--settings
          i.fas.fa-plug
          |  Widgets
        li.data__item.data__item--settings
          i.fas.fa-globe
          |  Domain

              
            
!

CSS

              
                $bg-base: #09306B;
$bg-lighten: lighten($bg-base, 5%);
$bg-darken: darken($bg-base, 5%);
$color: #eeeeee;

body {
  max-width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
  background-color: $bg-lighten;
  display: flex;
  justify-content: center;
  align-items: center;
}

.nav {
  background-color: darken($bg-darken, 5%);
  width: 720px;
  height: 350px;
  border-radius: 10px;
  box-shadow: 10px 10px 10px 5px darken($bg-darken, 10%);
  overflow: hidden;
  
  &:has(.tabs__input#profile:checked) {
    #profile__item {
      background-color: $bg-darken;
    }
  }
  
  &:has(.tabs__input#account:checked) {
    #account__item {
      background-color: $bg-darken;
    }
  }
  
  &:has(.tabs__input#settings:checked) {
    #settings__item {
      background-color: $bg-darken;
    }
  }
}

.tabs {
  font: bold 1rem verdana;
  color: $color;
  display: flex;
  align-items: center;
  margin-right: 10px;
  margin-top: 5px;
  
  &__item {
    border-radius: 5px 5px 0 0;
  }
  
  &__item:nth-child(2) {
    margin-left: auto;
  }
  
  &__item:not(:first-child):hover {
    background-color: $bg-darken;
  }
  
  &__brand {
    font-size: 1.4rem;
    padding: 0 15px;
    cursor: pointer;
  }
  
  &__label {
    display: block;
    padding: 20px;
    cursor: pointer;
  }
  
  &__label, &__brand {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
  }
  
  &__input {
    display: none;
    
    &:checked + .article {
      display: flex;
      align-items: flex-start;
      gap: 5px 30px;
      flex-wrap: wrap;
      
      &#profile {
        height: 73%;
      }
      
      &#account, &#settings {
        height: 67%
      }
    }
  }
}

.article {
  display: none;
  background-color: $bg-darken;
  font-family: Georgia;
  margin: 0 10px ;
  padding: 10px;
  position: relative;
  animation: fade 1.3s cubic-bezier(0.390, 0.575, 0.565, 1.000) both;
  
  & .data {
    color: $color;
    
    &__edit {
      padding: 5px;
      cursor: pointer;
      border-radius: 50%;
      
      &:hover {
        background-color: $color;
        color: lighten($bg-lighten, 5%);;
      }
    }
    
    &--details {
      line-height: 1.3rem;
      font-size: .9rem;
    }
    
    &__item {
      font-weight: bold;
      font-size: 1.2rem;
      line-height: 2rem;
      
      &--settings {
        margin-bottom: 2px;
        padding: 8px;
        border: 1px solid transparent;
        border-radius: 5px;
        cursor: pointer;
        
        &:hover {
          background-color: darken($bg-darken, 5%);
        }
      }
    }
  }
  
  &#profile &__body:last-child {
    border-top: 2px solid $bg-lighten;
    padding-top: 20px;
  }
  
  &#profile &__picture {
    position: relative;
  }
  
  &__btn--edit {
    position: absolute;
    right: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    color: $color;
    background-color: $bg-base;
    padding: 5px;
    border-color: transparent;
    border-radius: 5px;
    cursor: pointer;
    box-shadow: 2px 2px 5px 0px darken($bg-darken, 5%);
    
    
    &:hover {
      background-color: lighten($bg-base, 5%);
    }
  }
  
  &__icon {
    position: absolute;
    background-color: $bg-base;
    color: $color;
    bottom: -2px;
    right: -2px;
    font-size: 1.2rem;
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    
    
    &:hover {
      background-color: lighten($bg-base, 5%);
    }
    
  }
  
  &#profile &__avatar {
    width: 120px;
    border-radius: 10px;
    border: 5px solid lighten($bg-base, 5%);
    box-shadow: 8px 8px 5px 0px darken($bg-darken, 5%);
  }
  
  &#account, &#settings {
    justify-content: space-evenly;
    padding-top: 30px;
  }
}

@keyframes fade {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console