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.

            
              <div class="panel"></div>
<div class="survey">
  <div class="survey__wrapper">
    <h1 class="survey__title" id="title">Newsletter Satisfaction Survey</h1>
    <p class="survey__subtitle" id="description">Let us know how we can improve our Email Newsletter</p>
    <form class="survey__form form" id="survey-form">
      <div class="form__item">
        <input class="form__input" type="text" required id="name" name="Name" placeholder="Name" />
        <label class="form__label" id="name-label">Name *</label>
        <div class="form__input-border"></div>
        <div class="form__input-focus-border"></div>
      </div>
      <div class="form__item">
        <input class="form__input" type="email" required id="email" name="Email" placeholder="Email" />
        <label class="form__label" id="email-label">Email *</label>
        <div class="form__input-border"></div>
        <div class="form__input-focus-border"></div>
      </div>
      <div class="form__item">
        <input class="form__input" type="number" required id="number" name="Number" min="1" max="125" placeholder="Age" />
        <label class="form__label" id="number-label">Age *</label>
        <div class="form__input-border"></div>
        <div class="form__input-focus-border"></div>
      </div>      
      <p>What is your overall satisfaction with the newsletter?</p>
      <div class="form__item">
        <select class="form__select" type="number" required id="dropdown" name="Dropdown">
          <option disabled selected></option>
          <option>Very satisfied</option>
          <option>Somewhat satisfied</option>
          <option>Neutral</option>
          <option>Somewhat dissatisfied</option>
          <option>Very dissatisfied</option>
        </select>
        <label class="form__label">Choose One</label>
        <div class="form__input-border"></div>
        <div class="form__input-focus-border"></div>
        <div class="select__arrow"></div>
      </div>
      <p>How often do you read our newsletter?</p>
      <div class="form__item radio">
        <ul>
          <li>
            <label class="form__label--radio">
              Always
              <input class="form__radio" type="radio" name="Read" value="Always" />
              <span class="form__custom-radio"></span>
            </label>
          </li>
          <li>
            <label class="form__label--radio">
              Frequently
              <input class="form__radio" type="radio" name="Read" value="Frequently" />
              <span class="form__custom-radio"></span>
            </label>
          </li>
          <li>
            <label class="form__label--radio">
              Sometimes
              <input class="form__radio" type="radio" name="Read" value="Sometimes" />
              <span class="form__custom-radio"></span>
            </label>
          </li>
          <li>
            <label class="form__label--radio">
              Rarely
              <input class="form__radio" type="radio" name="Read" value="Rarely" />
              <span class="form__custom-radio"></span>
            </label>
          </li>
          <li>
            <label class="form__label--radio">
              Never
              <input class="form__radio" type="radio" name="Read" value="Never" />
              <span class="form__custom-radio"></span>
            </label>
          </li>
        </ul>
      </div>
      <p>Do you click through any of the links in the newsletter?</p>
      <div class="form__item">
        <ul>
          <li>
            <label class="form__label--checkbox">
              Click through to the website
              <input class="form__checkbox" type="checkbox" value="Click through to the website" name="Click" />
              <span class="form__custom-checkbox"></span>
            </label>
          </li>
          <li>
            <label class="form__label--checkbox">
              Click through on a story/stories
              <input class="form__checkbox" type="checkbox" value="Click through on a story/stories" name="Click" />
              <span class="form__custom-checkbox"></span>
            </label>
          </li>
          <li>
            <label class="form__label--checkbox">
              Click through on market data
              <input class="form__checkbox" type="checkbox" value="Click through on market data" name="Click" />
              <span class="form__custom-checkbox"></span>
            </label>
          </li>
          <li>
            <label class="form__label--checkbox">
              Click through on events
              <input class="form__checkbox" type="checkbox" value="Click through on events" name="Click" />
              <span class="form__custom-checkbox"></span>
            </label>
          </li>
          <li>
            <label class="form__label--checkbox">
              Click through on research
              <input class="form__checkbox" type="checkbox" value="Click through on research" name="Click" />
              <span class="form__custom-checkbox"></span>
            </label>
          </li>
          <li>
            <label class="form__label--checkbox">
              Click through on blog posts
              <input class="form__checkbox" type="checkbox" value="Click through on blog posts" name="Click" />
              <span class="form__custom-checkbox"></span>
            </label>
          </li>
        </ul>
      </div>
      <p>What can we do to improve the newsletter?</p>
      <div class="form__item">
        <textarea class="form__textarea" rows="4" cols="50" name="Improvements" required></textarea>
        <label class="form__label">Improvements</label>
        <div class="form__input-border"></div>
        <div class="form__input-focus-border"></div>
      </div>
      <input class="form__button" type="submit" id="submit" name="Submit" />
    </form>
  </div>
</div>
            
          
!
            
              @import url('https://fonts.googleapis.com/css?family=Roboto');

body {
  background-color: #e0e0e0;
  font-family: 'Roboto', sans-serif;
}
.panel {
  background-color: #75060f;
  display: block;
  height: 275px;
}
::placeholder {
  color: transparent;
}

.survey {
  padding: 20px;
}
.survey__wrapper {
  background-color: #fff;
  border-radius: 2px;
  box-shadow: 0 2px 5px 0 rgba(0,0,0,.16), 0 2px 10px 0 rgba(0,0,0,.12);
  margin: -140px auto 0;
  max-width: 575px;
  padding: 2rem;
}

.survey__form {
  display: flex;
  flex-direction: column;
  margin-top: 3rem;
  position: relative;
}
.form__item {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
  position: relative;
  width: 100%;
}
.form__item ul {
  list-style: none;
  padding: 0;
}

.form__label {
  color: #9e9e9e;
  left: 12px;
  top: 16px;
  pointer-events: none;
  position: absolute;
  transition: all 200ms;
}
.form__input {
  border: 0;
  padding: 16px 12px;
  transition: transform 200ms cubic-bezier(0.0, 0, 0.2, 1) 0ms;
}
.form__input:focus {
  outline: 0;
}
.form__input:focus + .form__label,
.form__input:valid + .form__label {
  color: #75060f;
  transform: translateY(-24px) translateX(-5px) scale(0.75);
}

.form__input-border {
  border-bottom: 1px solid rgba(0, 0, 0, .29);
  box-sizing: border-box;
  height: 2px;
}
.form__input-focus-border {
  box-sizing: border-box;
  position: relative;
  height: 2px;
  top: -2px;
  transition: transform 200ms cubic-bezier(0.0, 0, 0.2, 1) 0ms;
  transform: scaleX(0);
}
.form__input:focus ~ .form__input-focus-border,
.form__input:valid ~ .form__input-focus-border{
  border-bottom: 2px solid #75060f;
  transform: scaleX(1);
}

.form__select {
  border: 0;
  padding: 16px 8px;
  transition: transform 200ms cubic-bezier(0.0, 0, 0.2, 1) 0ms;
  -webkit-appearance: none;
}
.select__arrow::after {
  content: "\25be";
  font-size: 22px;
  pointer-events: none;
  position: absolute;
  right: 0;
  top: 12px;
  z-index: 2;
}
.form__select:focus {
  outline: 0;
}
.form__select:checked {
  display: none;
}
.form__select:focus + .form__label,
.form__select:valid + .form__label {
  color: #75060f;
  transform: translateY(-24px) translateX(-12px) scale(0.75);
}

.form__select:focus ~ .form__input-focus-border,
.form__select:valid ~ .form__input-focus-border{
  border-bottom: 2px solid #75060f;
  transform: scaleX(1);
}
/* .form__select:focus + .select__arrow::after {
  content: "\25b4";
} */

.radio {
  margin-bottom: 0;
}
.form__label--radio {
  cursor: pointer;
  display: block;
  margin-bottom: 20px;
  padding-left: 30px;
  position: relative;
  user-select: none;
}
.form__label--radio input {
  cursor: pointer;
  opacity: 0;
  position: absolute;
}
.form__custom-radio {
  background-color: rgba(0, 0, 0, .15);
  border-radius: 50%;
  height: 25px;
  left: 0;
  position: absolute;
  top: -4px;
  width: 25px;
}
.form__label--radio:hover input ~ .form__custom-radio {
  background-color: rgba(0, 0, 0, .29);
}
.form__label--radio input:checked ~ .form__custom-radio {
  background-color: #75060f;
}
.form__custom-radio:after {
  content: "";
  position: absolute;
  display: none;
}
.form__label--radio input:checked ~ .form__custom-radio:after {
  display: block;
}
.form__label--radio .form__custom-radio:after {
  background-color: #75060f;
  border: 3px solid #fff;
  border-radius: 50%;
  height: 13px;
  left: 2.9px;
  top: 2.9px;
  width: 13px;
}

.form__label--checkbox {
  cursor: pointer;
  display: block;
  margin-bottom: 20px;
  padding-left: 30px;
  position: relative;
  user-select: none;
}
.form__label--checkbox input {
  cursor: pointer;
  opacity: 0;
  position: absolute;
}
.form__custom-checkbox {
  background-color: rgba(0, 0, 0, .15);
  height: 25px;
  left: 0;
  position: absolute;
  top: -4px;
  width: 25px;
}
.form__label--checkbox:hover input ~ .form__custom-checkbox {
  background-color: rgba(0, 0, 0, .29);
}
.form__label--checkbox input:checked ~ .form__custom-checkbox {
  background-color: #75060f;
}
.form__custom-checkbox:after {
  content: "";
  position: absolute;
  display: none;
}
.form__label--checkbox input:checked ~ .form__custom-checkbox:after {
  display: block;
}
.form__label--checkbox .form__custom-checkbox:after {
  background-color: #75060f;
  border: solid #fff;
  border-width: 0 3px 3px 0;
  height: 13px;
  left: 8.3px;
  top: 2px;
  transform: rotate(45deg);
  width: 6px;
}

.form__textarea {
  border: 0;
  padding: 16px 12px;
  transition: transform 200ms cubic-bezier(0.0, 0, 0.2, 1) 0ms;
}
.form__textarea:focus {
  outline: 0;
}
.form__textarea:focus + .form__label,
.form__textarea:valid + .form__label {
  color: #75060f;
  transform: translateY(-24px) translateX(-12px) scale(0.75);
}

.form__textarea:focus ~ .form__input-focus-border,
.form__textarea:valid ~ .form__input-focus-border{
  border-bottom: 2px solid #75060f;
  transform: scaleX(1);
}

.form__button {
  align-self: center;
  background-color: #75060f;
  border: none;
  border-radius: 4px;
  box-shadow: 0px 1px 5px 0px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 3px 1px -2px rgba(0, 0, 0, 0.12);
  color: #fff;
  margin-top: 25px;
  padding: 8px 16px;
  text-transform: uppercase;
}
.form__button:hover {
  background-color: #5d050c;
  cursor: pointer;
}
            
          
!
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.

Console