Skip to content

Instantly share code, notes, and snippets.

@ryanseddon
ryanseddon / css.styl
Created October 10, 2013 10:50
How can I do this? Stylus as far as I know doesn't like @supports how can I put the parsed css block into the @css literal. I want it to output like the desired-output.css file.
@css {
@supports (flex-flow: row wrap) {
.foo
display: block
> span
display: inline-block
margin-right: 0.3ch;
foo.bar
> span
@ryanseddon
ryanseddon / index.html
Last active December 18, 2015 09:39
iOS6 will keep the network activity spinner around forever, with no fix, if you do a CORS ajax request at any time with preflight the network activity spinner will stay until the tab is closed.
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Forever iOS network activity spinner</title>
<style>
p {
-webkit-transition: 0.5s ease;
-moz-transition: 0.5s ease;
@ryanseddon
ryanseddon / LICENSE.txt
Created January 21, 2013 03:55
postMessage structured clone detection
Copyright (c) 2013 Ryan Seddon
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
@ryanseddon
ryanseddon / dabblet.css
Created May 8, 2012 00:24
FizzBuzz with CSS
/**
* FizzBuzz with CSS
*/
body {
counter-reset: fizzbuzz;
}
div {
@ryanseddon
ryanseddon / dabblet.css
Created May 8, 2012 00:24 — forked from jackie/dabblet.css
FizzBuzz with CSS
/**
* FizzBuzz with CSS
*/
body {
counter-reset: fizzbuzz;
}
div {
html, body {
display: table;
height: 100%;
width: 100%;
}
body {
display:table-cell;
vertical-align:middle;
text-align: center;
}
@ryanseddon
ryanseddon / gist:1880661
Created February 22, 2012 02:09
Google Images file drop code
L(w, "drop", function (a) {
a = a || window.event;
a.preventDefault && a.preventDefault();
if (a.dataTransfer.files.length) try {
var b = new FileReader;
b.onload = function (a) {
a = a || window.event;
if (b.readyState == b.DONE && a.target.result) {
for (var c = document.getElementById("dragi"), d = a.target.result, a = [], n = 0, m = 0; m < d.length; m++) {
for (var l = d.charCodeAt(m); 255 < l;) a[n++] = l & 255, l >>= 8;
@ryanseddon
ryanseddon / dabblet.css
Created January 9, 2012 23:50
Font features
/**
* Font features
*/
p {
font-family: Gabriola, cursive;
font-size: 24pt;
-ms-font-feature-settings: "ss06" 1;
/**
* That's allota prefixes - http://lea.verou.me/css3patterns/#stars
*/
background:
-moz-linear-gradient(126deg, #232927 4%, transparent 4%) -70px 43px,
-moz-linear-gradient( 54deg, #232927 4%, transparent 4%) 30px 43px,
-moz-linear-gradient( 18deg, #e3d7bf 8.5%, transparent 8.5%) 30px 43px,
-moz-linear-gradient(162deg, #e3d7bf 8.5%, transparent 8.5%) -70px 43px,
-moz-linear-gradient(234deg, #e3d7bf 7.5%, transparent 7.5%) -70px 23px,
@ryanseddon
ryanseddon / gist:1464972
Created December 12, 2011 04:45
Extending modernizr core tests without changing the core
if(Modernizr.postmessage) {
// So we can extend it but still do `if(Modernizr.postmessage)`
Modernizr.postmessage = new Boolean(true);
Modernizr.postmessage.extend = function() {
// Do some tests
return bool;
}
}