Skip to content

Instantly share code, notes, and snippets.

View Chrisedmo's full-sized avatar

Chris Mousdale Chrisedmo

View GitHub Profile
/**
* CSS3 Webkit text/image clippins w/fallback: http://nimbupani.com/using-background-clip-for-text-with-css-fallback.html
*/
body {
background-color: #444 }
h1 {
text-align: center;
font-size: 5em;
font-family: sans-serif;
color: #fff;
@Chrisedmo
Chrisedmo / dabblet.css
Created February 23, 2013 14:31
Nice CSS3 Piechart effect - could be a nav?
/**
* Nice CSS3 Piechart effect - could be a nav?
*/
html { background: gainsboro; }
body {
margin: 3em auto 0;
width: 6em;
height: 6em;
@Chrisedmo
Chrisedmo / dabblet.css
Created February 22, 2013 12:08
CSS3 gradients on text…
/**
* CSS3 gradients on text…
*/
h2[data-text] {
position: relative;
font-size: 20vh;
font-family: helvetica, sans-serif;
color: transparent;
// History.js It!
// v1.0.1 - 30 September, 2012
// https://gist.github.com/854622
(function(window,undefined){
// Prepare our Variables
var
History = window.History,
$ = window.jQuery,
document = window.document;
@Chrisedmo
Chrisedmo / sketch.md
Last active December 14, 2015 00:08
Sketch problem

Hmm i'm not sure i get that… sorry, I am trying to recreate this file that i did in illustrator into sketch.

Icon

I drew a circle, and then tried to draw a single line using the vector pen, with a border of 0 to act as a scissor / cut line. I then tried selecting the circle, and the path and then going to edit>paths>split and it was greyed out?

Am i missing something?

@Chrisedmo
Chrisedmo / dabblet.css
Created February 18, 2013 12:02
Overflow scroll horizontal - No FlexBox
/* Needs Modernizr obv… */
.lt-ie9 #logo,
.no-svg #logo {
background: url("logo.png");
_background-image: url("logo.gif");
}
.lt-ie9 #logo img,
.no-svg #logo img {
opacity: 0;
@Chrisedmo
Chrisedmo / vh-resizer.js
Created January 17, 2013 09:39
Cool vh fallback - update an elements size based on window height + width.
$(document).ready(
function(){
//resizes div box to perfect window w/h
function sizeMe() {
$('#mySlider').css({height:($(window).height()-150),width:$(window).width()});
};
sizeMe();
});
@Chrisedmo
Chrisedmo / tweet.js
Created October 30, 2012 11:16
Quick JS tweets for static site.
$(document).ready(function () {
// Type in your twitter id here
var user = 'TWITTERID';
// How many Tweets do you want to display?
//Type in the number after &count=
// Do you wanna show RT's? include_rts= '0 for no' or '1 for yes'
$.getJSON('http://api.twitter.com/1/statuses/user_timeline.json?screen_name=' + user + '&count=3&include_rts=1&callback=?', function(data) {
@Chrisedmo
Chrisedmo / jquerydisplay.js
Last active October 11, 2015 07:58
jQuery Display Current Window Dimensions
$(document).ready(function () {
windowWrap();
displayWindowSize();
$(window).resize(function () {
displayWindowSize();
});
function windowWrap() {
$('body').append('<div id="dev" style="position: fixed; top: 0; right: 0; color: #f00; font-weight: bold;"></div>');
};
function displayWindowSize() {