JavaScript preprocessors can help make authoring JavaScript easier and more convenient. For instance, CoffeeScript can help prevent easy-to-make mistakes and offer a cleaner syntax and Babel can bring ECMAScript 6 features to browsers that only support ECMAScript 5.
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.
You can apply a script from anywhere on the web to your Pen. Just put a URL to it here and we'll add it, in the order you have them, before the JavaScript in the Pen itself.
If the script you link to has the file extension of a preprocessor, we'll attempt to process it before applying.
You can also link to another Pen here, and we'll pull the JavaScript from that Pen and include it. If it's using a matching preprocessor, we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
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.
<article>
<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>
<fieldset>
<input type="text" value="zoom"><input type="text" class="no-zoom" value="zoom disabled">
</fieldset>
<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=''>
</article>
@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
}
Also see: Tab Triggers