cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

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

Looking for quick-add? Try the external resource search, it's quicker and gives you access to the most recent version of thousands of libraries. ☝️

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

Looking for quick-add? Try the external resource search, it's quicker and gives you access to the most recent version of thousands of libraries. ☝️

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.

            
              <div class="row">
  <p>Things I learned about IE text inputs.</p>
  <p>(View in IE10 to see examples.)</p>
</div>
<div class="row">
  <p>Placeholder text styling can affect the input styling. I've set the font size of the placeholder text to 0.</p>
  <span>
    <input class="clean-slide a" id="name" type="text" placeholder="Your best name" /><label for="name">Name</label>
  </span>
  <span>
    <input class="clean-slide a" id="email" type="text" placeholder="Your favorite email" /><label for="email">Email</label>
  </span>
  <span>
    <input class="clean-slide a" id="phone" type="text" placeholder="You can trust us" value="Really long value" /><label for="phone">Phone</label>
  </span>
</div>
<div class="row">
  <p>Text indent on the placeholder messes with the cursor's initial location until you start typing, but does not actually indent the placeholder text.</p>
  <span>
    <input class="clean-slide b" id="age" type="text" placeholder="Go for the high score!" /><label for="age">Age</label>
  </span>
  <span>
    <input class="clean-slide b" id="height" type="text" placeholder="Heels count" /><label for="height">Height</label>
  </span>
  <span>
    <input class="clean-slide b" id="weight" type="text" placeholder="Go ahead and lie" /><label for="weight">Weight</label>
  </span>
</div>
<div class="row">
  <p>Transitions don't work on placeholder text or the input. In fact, the padding takes no effect until the input is focused. The focus/active padding takes no effect until typing. The following example's padding changes on focus/active.</p>
  <span>
    <input class="clean-slide c" id="class" type="text" placeholder="Wizard!" /><label for="class">Class</label>
  </span>
  <span>
    <input class="clean-slide c" id="element" type="text" placeholder="Five to choose from" /><label for="element" >Element</label>
  </span>
  <span>
    <input class="clean-slide c" id="move" type="text" placeholder="Secret book attack!" /><label for="move">Move</label>
  </span>
</div>
<div class="row">
  <p>If the font weight of the placeholder text is different than the weight of the value, you can see the placeholder change when removing focus from the input. If you look closely, you can see the weight change if you click between these inputs.</p>
  <span>
    <input class="clean-slide d" id="english" type="text" placeholder="Do you speak it?" /><label for="english">English</label>
  </span>
  <span>
    <input class="clean-slide d" id="burger" type="text" placeholder="A Royale with cheese?" /><label for="burger">Burger</label>
  </span>
  <span>
    <input class="clean-slide d" id="wallet" type="text" placeholder="Bad Mother****er" /><label for="wallet">Wallet</label>
  </span>
</div>
<div class="row">
  <p>You can remove the X that appears using: <code>::-ms-clear {display: none;}</code></p>
  <span>
    <input class="clean-slide e" id="card" type="text" placeholder="Fund me!" value="Really long value" /><label for="card">Credit Card</label>
  </span>
  <span>
    <input class="clean-slide e" id="expires" type="text" placeholder="Month Day, Year" value="Really long value" /><label for="expires">Expires</label>
  </span>
  <span>
    <input class="clean-slide e" id="security" type="text" placeholder="Public" value="Really long value" /><label for="security">Security Code</label>
  </span>
</div>
<div class="row">
  <p>I could not find a way to hide placeholder text. Setting the color to match the background color is the closest, but the text still flashes when removing focus. This is what <code>display: none;</code> on the placeholder text does.</p>
  <span>
    <input class="clean-slide f" id="knock" type="text" placeholder="Who's there?" /><label for="knock">Knock knock</label>
  </span>
  <span>
    <input class="clean-slide f" id="max" type="text" placeholder="Max who?" /><label for="max">Max</label>
  </span>
  <span>
    <input class="clean-slide f" id="out" type="text" placeholder="Sunuva..." /><label for="out">Maxed out card ;)</label>
  </span>
</div>
<div class="row">
  <p>This is what <code>opacity: 0;</code> on the placeholder text does. At least the fields are still clickable...</p>
  <span>
    <input class="clean-slide g" id="artist" type="text" placeholder="BO$$" /><label for="artist">Artist</label>
  </span>
  <span>
    <input class="clean-slide g" id="song" type="text" placeholder="I don't give a ****" /><label for="song">Song</label>
  </span>
  <span>
    <input class="clean-slide g" id="eyes" type="text" placeholder="Crazy" /><label for="eyes">Eyes</label>
  </span>
</div>
<div class="row">
  <p>My recommendation would be to fall back to something like this for IE. It's not as efficient or flashy, but it works.</p>
  <span>
    <input class="solution h" id="state" type="text" placeholder="Liquid, solid, gaseous..." /><label for="state">State</label>
  </span>
  <span>
    <input class="solution h" id="planet" type="text" placeholder="Probably Earth" /><label for="planet">Planet</label>
  </span>
  <span>
    <input class="solution h" id="galaxy" type="text" placeholder="Milky Way?" /><label for="galaxy">Galaxy</label>
  </span>
</div>
            
          
!
            
              @import "compass/css3";

@import url(https://fonts.googleapis.com/css?family=Open+Sans:400,700,600,300,800);

* {
  box-sizing: border-box;
}
html,
body {
  overflow-x: hidden;
  font-family: "Open Sans", sans;
  font-weight: 300;
  color: #fff;
  background: #efefef;
}
@mixin epic-sides() { // https://codepen.io/MichaelArestad/pen/qltuk
    position: relative;
    z-index: 1;

    &:before {
        position: absolute;
        content: "";
        display: block;
        top: 0;
        left: -5000px;
        height: 100%;
        width: 15000px;
        z-index: -1;
        @content;
    }
}
.row {
  max-width: 800px;
  margin: 0 auto;
  padding: 60px 30px;
  @include epic-sides() {background: inherit;}
  text-align: center;
  
  &:first-child {
    padding: 40px 30px;
    font-weight: 700;
    background: #00ccff;
    
    p:nth-child(2) {
      font-weight: 400;
    }
  }
  &:nth-child(2),
  &:nth-child(8){
    background: #1a1a1a;
  }
  &:nth-child(3),
  &:nth-child(7),
  &:nth-child(9) {
    background: #2a2a2a;
  }
  &:nth-child(4),
  &:nth-child(6),
  &:nth-child(10) {
    background: #3a3a3a;
  }
  &:nth-child(5) {
    background: #4a4a4a;
  }
  
  span {
    position: relative;
    display: inline-block;
    margin: 30px 10px;
  }
}
input[type="text"]:-ms-input-placeholder {
  color: #aaa;
  font-weight: 300;
}
.clean-slide {
  display: inline-block;
  width: 215px;
  padding: 10px 0 10px 15px;
  font-family: "Open Sans", sans;
  font-weight: 400;
  color: #377D6A;
  background: #efefef;
  border: 0;
  border-radius: 3px;
  outline: 0;
  transition: all .3s ease-in-out;

  + label {
    display: inline-block;
    position: absolute;
    top: 0;
    left: 0;
    padding: 10px 15px;
    text-shadow: 0 1px 0 rgba(19,74,70,.4);
    background: #00ccff;
    transition: all .3s ease-in-out;
    border-top-left-radius: 3px;
    border-bottom-left-radius: 3px;
  }
}
.clean-slide:focus,
.clean-slide:active {
  color: #377D6A;
  //padding-left: 85px;
  background: #fff;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  
  + label {
    transform: translateX(-100%);
  }
}
.a {
  &:-ms-input-placeholder {
    color: #aaa;
    font-weight: 300;
    font-size:0;
  }
}
.b {
  &:-ms-input-placeholder {
    color: #aaa;
    font-weight: 300;
    text-indent: 70px;
  }
}
.c {
  padding-left: 80px;

  &:focus,
  &:active {
    padding-left: 15px;
  }
}
.d {
  font-weight: 800;
}
.e {
  &::-ms-clear {display: none;}
}
.f {
  &:-ms-input-placeholder {
    display: none;
  }
  
  &:focus,
  &:active {
    display: inline-block;
  }
}
.g {
  opacity: 1;

  &:-ms-input-placeholder {
    opacity: 0;
  }
}
.solution {
  display: inline-block;
  width: 215px;
  padding: 10px 0 10px 15px;
  font-family: "Open Sans", sans;
  font-weight: 400;
  color: #377D6A;
  background: #efefef;
  border: 0;
  border-radius: 3px;
  outline: 0;
  transition: all .3s ease-in-out;

  + label {
    display: inline-block;
    position: absolute;
    bottom: 100%;
    left: 0;
    margin-bottom: 5px;
    padding: 3px 13px;
    text-shadow: 0 1px 0 rgba(19,74,70,.4);
    transition: all .3s ease-in-out;
    border-radius: 3px;
    background: #3a3a3a;
    overflow: hidden;
  }
}
.solution:focus,
.solution:active {
  color: #377D6A;
  background: #fff;
  
  + label {
    background: #00ccff;
  }
}
            
          
!
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