Pen Settings



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


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


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.


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.


                <div class="modal-body">
  <header class="modal-header">
    <h2>Modal Title</h2>
    <button class="modal-btn">
      <svg width="24" height="24" viewBox="0 0 24 24"> <path d="M16,12A2,2 0 0,1 18,10A2,2 0 0,1 20,12A2,2 0 0,1 18,14A2,2 0 0,1 16,12M10,12A2,2 0 0,1 12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12M4,12A2,2 0 0,1 6,10A2,2 0 0,1 8,12A2,2 0 0,1 6,14A2,2 0 0,1 4,12Z" /> </svg>
  <div class="modal-content">
    <p>Lorem ipsum dolor, sit amet consectetur adipisicing elit. Illo ducimus, omnis similique ipsa quae non reiciendis perspiciatis asperiores. <br><br> eos magni ad eligendi vero adipisci commodi expedita autem eius totam ut.</p>
  <footer class="modal-footer">
    <button class="button">Save changes</button>
    <button class="button button--outline">Cancel</button>


                .modal-body {
  position: absolute;
  left: 50%;
  top: 20vh;
  transform: translateX(-50%);
  width: 450px;
  max-width: 90%;
  background: #ece8f6;
  border-radius: 7px;
  overflow: hidden;

.modal-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: #856dc1;
  h2 {
    color: #fff;
    font-weight: bold;
    font-size: 20px;

.modal-btn {
  appearance: none;
  font-family: inherit;
  font-size: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  svg {
    fill: #fff;
    width: 30px;
    height: 30px;

.modal-content {
  padding: 1rem;
  line-height: 1.5;

.modal-footer {
  padding: 1rem;
  background: #856dc1;

.button {
  appearance: none;
  font-family: inherit;
  display: inline-block;
  min-width: 100px;
  border: 2px solid transparent;
  border-radius: 5px;
  background: darken(#856dc1, 20%);
  color: #fff;
  padding: 10px 16px;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: 0.3s ease-out;
  &:hover {
    background: #1d49aa;
  &:focus {
    outline: none;
    box-shadow: 0 0 0 4px #cbd6ee;
  & + & {
    margin-left: 0.5rem;

.button--outline {
  background: transparent;
  border-color: #fff;

body {
  font-family: "Rubik";
  margin: 0;
  background: #fafafa;

* {
  box-sizing: border-box;