Pen Settings

HTML

CSS

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

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

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

              
                <div class="container">
  <div class="Terminal">
    <div class="Terminal__Toolbar">
      <div class="Toolbar__buttons">
        <button class="Toolbar__button Toolbar__button--exit">&#10005;</button>
        <button class="Toolbar__button">&#9472;</button>
        <button class="Toolbar__button">&#9723;</button>
      </div>
      <p class="Toolbar__user">cody@ubuntu:~</p>
    </div>
    <div class="Terminal__body">
      <div class="Terminal__text">Welcome to Ubuntu!</div>
      <div class="Terminal__Prompt">
        <span class="Prompt__user">cody@ubuntu:</span><span class="Prompt__location">~</span><span class="Prompt__dollar">$</span>
        <span class="Prompt__cursor"></span>
      </div>
    </div>
  </div>
</div>

              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css?family=Ubuntu+Mono');
@import url('https://fonts.googleapis.com/css?family=Ubuntu');

body {
  background: linear-gradient(45deg, #57003f 0%,#f57453 100%);
  font-family: 'Ubuntu';
}

.container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;

}
.Terminal {
  width: 600px;
  height: 400px;
  box-shadow: 2px 4px 10px rgba(0,0,0,.5);
}

.Terminal__Toolbar {
  background: linear-gradient(#504b45 0%,#3c3b37 100%);
  width: 100%;
  padding: 0 8px;
  box-sizing: border-box;
  height: 25px;
  display: flex;
  align-items: center;
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
}

.Toolbar__buttons {
  display: flex;
  align-items: center;
}

.Toolbar__button {
  width: 12px;
  height: 12px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 100%;
  padding: 0;
  font-size: 7px;
  background: linear-gradient(#7d7871 0%, #595953 100%);
  text-shadow: 0px 1px 0px rgba(255,255,255,0.2);
  box-shadow: 0px 0px 1px 0px #41403A,0px 1px 1px 0px #474642;
  border: none;
  margin-right: 4px;

}
.Toolbar__button:hover {
  cursor: pointer;
}
.Toolbar__button--exit {
  background: #f25d2b;
  background: linear-gradient(#f37458 0%, #de4c12 100%);
  background-clip: padding-box;
}
.Toolbar__button:focus {
  outline: none;
}

.Toolbar__user {
  color: #d5d0ce;
  margin-left: 4px;
  font-size: 12px;
  line-height: 14px;
  margin-bottom: 1px;
}
.Terminal__body {
  background: rgba(56, 4, 40, .9);
  height: calc(100% - 25px);
  margin-top: -1px;
  padding-top: 2px;
  font-family: 'Ubuntu mono';
}
.Terminal__text {
  color: #ddd;
}

.Terminal__Prompt {
  margin-top: 10px;
  display: flex;
}

.Prompt__user {
  color: #87d441;
}
.Prompt__location {
  color: #6d85a9;
}
.Prompt__dollar {
  color: #ddd;
}
.Prompt__cursor {
  height: 17px;
  width: 8px;
  background: white;
  display: block;
  margin-left: 8px;
  animation: 2000ms ease infinite alternate blink;
}

@keyframes blink {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@media (max-width: 600px) {
  .Terminal {
    max-height: 90%;
    width: 95%;
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console