css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

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.

    <h1>Disable iOS input zoom (CSS only)</h1>
    <p>It seems like the only way to prevent iOS from zooming in on input fields is to set a font size of minimum 16px... but what if I like 12px better?</p>

        <input type="text" value="zoom"><input type="text" class="no-zoom" value="zoom disabled">
    <p>To workaround this we set the font size to 16px and use transform scale (12px/16px = 0.75) to size everything
       down to a visual match of 12px addjusting margins to remove empty space caused by the transform.</p>
    <p>Please note that CSS transforms can cause problems with subpixel rendering (blurry borders and lighter colors).</p>
    <p>Open page in <a href="https://codepen.io/jakob-e/debug/yakBwJ" target="_blank">debug mode</a>, <a href="https://codepen.io/jakob-e/pen/yakBwJ" target="_blank">code mode</a> or scan the QR below:</p>   
   <img src='https://chart.googleapis.com/chart?cht=qr&chl=http%3A%2F%2Fcodepen.io%2Fjakob-e%2Fdebug%2FyakBwJ&chs=180x180&choe=UTF-8&chld=L|2' alt=''>

              @import url('https://fonts.googleapis.com/css?family=Raleway|Roboto+Condensed');
html{box-sizing: border-box;}
*,*:before,*:after {box-sizing:inherit;}
body {margin:16px;  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
article,fieldset {display:block;}
h1 { font-family: 'Raleway', sans-serif; color:tomato;  }
p  { font-family: 'Roboto Condensed', sans-serif; font-size:14px; }
article { max-width: 480px; margin:0 auto; }
fieldset {border:0;margin:24px 0 24px -12px;padding:0;text-align:center;font-size:0; }
input {margin:0 0 12px 12px; }
img { margin:16px auto; display:block; max-width: 100%;}
a {color: tomato; text-decoration: none;&:hover{text-decoration:underline;}}

input {
    vertical-align: top;
    appearance: none;
    border: 1px solid silver;
    border-radius: 5px;
    padding: 4px;
    width : 180px;
    height: 24px;    
    font-size: 12px; 
    outline: 0;
input:focus { border-color: skyblue; }

.no-zoom {
    font-size: 16px;
    transform-origin: top left;
    transform: scale(0.75);    //  12px / 16px

    //  size up
    width:  240px;             // 180px / 0.75
    height: 32px;              //  24px / 0.75
    padding      : 5.333333px; //   4px / 0.75
    border-radius: 6.666667px; //   5px / 0.75
    border-width : 1.333333px; //   1px / 0.75
    //  size down    
    margin-right: -60px;       // 240px * 0.25
    margin-bottom: -8px;       //  32px * 0.25
🕑 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 ..................