Skip to content

Instantly share code, notes, and snippets.

@brysongilbert
brysongilbert / gist:4ca460c7562208a66464
Created November 18, 2014 14:47
Best WP spam comment ever?
{
{I have|I've} been {surfing|browsing} online
more than {three|3|2|4} hours today, yet I never found any interesting article like yours.
{It's|It is} pretty worth enough for me. {In my opinion|Personally|In my view},
if all {webmasters|site owners|website owners|web
owners} and bloggers made good content as you did, the {internet|net|web} will be
{much more|a lot more} useful than ever before.|
I {couldn't|could not} {resist|refrain from} commenting.
{Very well|Perfectly|Well|Exceptionally well} written!|
{I will|I'll} {right away|immediately} {take hold of|grab|clutch|grasp|seize|snatch} your {rss|rss feed} as I {can not|can't} {in finding|find|to find} your
@brysongilbert
brysongilbert / pagination.html
Created November 11, 2014 16:36
Fairly accessible pagination markup example. Non-essential classes removed for clarity.
<ul aria-label="Pagination">
<li><a href="#">Previous<span class="screen-reader"> page</span></a></li>
<li><a aria-disabled="true" href="#"><span class="screen-reader">Currently on page </span>1</a></li>
<li><a href="#"><span class="screen-reader">Page </span>2</a></li>
<li><a href="#"><span class="screen-reader">Page </span>3</a></li>
<li><a href="#"><span class="screen-reader">Page </span>4</a></li>
<li><a href="#"><span class="screen-reader">Page </span>5</a></li>
<li><a href="#">Next<span class="screen-reader"> page</span></a></li>
</ul>
@brysongilbert
brysongilbert / ttc_stations.json
Created January 20, 2014 21:15
TTC subway stations in and around Toronto. Currently only contains stations on the 1 Yonge-University-Spadina line. Inspired by https://gist.github.com/oobrien/8525859
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@brysongilbert
brysongilbert / gist:7874461
Created December 9, 2013 15:58
LESS Mixin for font-size in ems
.fontEms(@desired, @context: 16) {
font-size: (round((@desired / @context), 4) * 1em);
}
@brysongilbert
brysongilbert / gist:6062276
Last active March 26, 2022 00:17
CSS colour invert via SVG filter for Webkit, Firefox, and Internet Explorer 6-8.
/* WebKit */
-webkit-filter: invert();
/* Firefox */
filter: url("data:image/svg+xml;utf8,<svg height='0' xmlns='http://www.w3.org/2000/svg'><filter id='negative'><feColorMatrix values='-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0'/></filter></svg>#negative");
/* IE 6-7 */
filter: progid:DXImageTransform.Microsoft.BasicImage(invert=1);
/* IE 8 */
-ms-filter: 'progid:DXImageTransform.Microsoft.BasicImage(invert=1)';
@brysongilbert
brysongilbert / css-gradient-mixin.less
Created October 15, 2012 20:35
LESS Mixin for CSS/SVG Vertical Gradients
// Vertical gradient using CSS where possible, and base64-encoded SVG for IE9 (enables use of this in combination with border-radius)
// Based on this by Phil Brown: http://blog.philipbrown.id.au/2012/09/base64-encoded-svg-gradient-backgrounds-in-less/
// Also based on a mixin from Twitter Bootstrap: https://github.com/twitter/bootstrap
.gradient-vertical(@startColor, @endColor) {
// IE9 prep
@dataPrefix: ~"url(data:image/svg+xml;base64,";
@dataSuffix: ~")";
@dataContent: ~'<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 1 1" preserveAspectRatio="none"><linearGradient id="g743" gradientUnits="userSpaceOnUse" x1="0%" y1="0%" x2="0%" y2="100%"><stop stop-color="@{startColor}" offset="0"/><stop stop-color="@{endColor}" offset="1"/></linearGradient><rect x="0" y="0" width="1" height="1" fill="url(#g743)"/></svg>';
@brysongilbert
brysongilbert / css-shadow-mixin.less
Created October 15, 2012 01:48
LESS Mixin for CSS/SVG Filter Drop Shadows
// Drop shadow using SVG/CSS filters were possible
// Requires Modernizr and the css-filters and svg-filters community add-ons
.filter-shadow(@x, @y, @size, @color) {
// Firefox 10+
.svgfilters & {
@svgSize: @size/2; // the SVG blur is a little larger than the CSS equivalent
filter: url('data:image/svg+xml;utf8,<svg%20height="100"%20xmlns="http://www.w3.org/2000/svg"><filter%20id="drop-shadow"><feGaussianBlur%20in="SourceAlpha"%20stdDeviation="@{svgSize}"/><feOffset%20dx="@{x}"%20dy="@{y}"%20result="offsetblur"/><feFlood%20flood-color="@{color}"/><feComposite%20in2="offsetblur"%20operator="in"/><feMerge><feMergeNode/><feMergeNode%20in="SourceGraphic"/></feMerge></filter></svg>#drop-shadow');
}
// Chrome 19+, Safari 6+