View sarcastic.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
em.sarcastic { | |
display: inline-block; | |
font-style: normal; | |
-webkit-transform: rotate(-15deg) skew(0, 15deg); | |
-moz-transform: rotate(-15deg) skew(0, 15deg); |
View 1. single-line.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<figure class="quote"> | |
<blockquote>It is the unofficial force—the Baker Street irregulars.</blockquote> | |
</figure> |
View cursor-reset.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
html, | |
body { | |
cursor: default; | |
} | |
code { | |
cursor: text; | |
} | |
/* |
View Regexes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Email regex: (supports pluses and dots in username) | |
/^(?:[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+\.)*[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+@(?:(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!\.)){0,61}[a-zA-Z0-9]?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!$)){0,61}[a-zA-Z0-9]?)|(?:\[(?:(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\.){3}(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\]))$/ | |
URL regex: (validates both with and without http://) | |
/^((http|https):\/\/)?(www[.])?([a-zA-Z0-9]|-)+([.][a-zA-Z0-9(-|\/|=|?)?]+)+$/ |
View autogrow.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($){ | |
$(document).ready(function (){ | |
$('textarea[data-autoresize]').on('input propertychange', function() { | |
autoResize($(this)); | |
}); |
View code-sample-with-caption.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<figure class="code"> | |
<pre><code class=“language-markup”><meta charset="utf-8"/></code></pre> | |
<figcaption>A UTF-8 encoding declaration should appear at the beginning of every <head> element.</figcaption> | |
</figure> |
View columns.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.columns { | |
display: block; | |
list-style-type: none; | |
margin-bottom: 24px; | |
-moz-column-count: 2; | |
-moz-column-gap: 24px; | |
-webkit-column-count: 2; | |
-webkit-column-gap: 24px; | |
column-count: 2; | |
column-gap: 24px; |
View placeholder-polyfill.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (!Modernizr.input.placeholder) { | |
$('*[placeholder]').each(function() { | |
placeholder = $(this).attr('placeholder'); | |
$(this).attr('value', placeholder).addClass('fakePlaceholder'); | |
}); |
View auto-footnote.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('sup[data-footnote]').each(function(index) { | |
noteCount = $(this).html(); | |
$(this).html('<a id="ref' + noteCount + '" href="#note' + noteCount + '">' + noteCount + '</a>'); | |
$('#footnotes li').eq(noteCount - 1).attr('id', 'note' + noteCount).prepend('<a href="#ref' + noteCount + '">' + noteCount + '.</a> '); | |
}); |
OlderNewer