Skip to content

Instantly share code, notes, and snippets.

View dvschultz's full-sized avatar

Derrick Schultz (he/him) dvschultz

View GitHub Profile
@dvschultz
dvschultz / content-breakpoints.js
Created May 23, 2012 09:11
psudeocode for interdigitation solution
//Psuedocode (To be updated)
var $window = window.innerWidth;
$(window).resize(function{
$window = window.innerWidth;
});
$('.region').each(function(){
var $breakpoint = data-breakpoint;
@dvschultz
dvschultz / gist:3049956
Created July 4, 2012 23:00
to-do for me. Figure out if this could work in Inkling.
.cssgradients #hot-links h2 a:hover {
-webkit-background-clip: text;
color: white;
-webkit-text-fill-color: transparent;
background-image: -webkit-gradient(linear, left top, right top, from(#ea8711), to(#d96363));
background-image: -webkit-linear-gradient(left, #ea8711, #d96363, #73a6df, #9085fb, #52ca79);
background-image: -moz-linear-gradient(left, #ea8711, #d96363, #73a6df, #9085fb, #52ca79);
background-image: -ms-linear-gradient(left, #ea8711, #d96363, #73a6df, #9085fb, #52ca79);
background-image: -o-linear-gradient(left, #ea8711, #d96363, #73a6df, #9085fb, #52ca79);
}
@dvschultz
dvschultz / gist:5918194
Last active December 19, 2015 07:19
These styles will hide the Yahoo bar of ugly from Flickr.com
#eyebrow-wrap {
display: none;
}
body.with-eyebrow #global-nav {
top: 0 !important; /* might need an !important for Safari or Chrome */
}
@dvschultz
dvschultz / gist:7360480
Created November 7, 2013 19:28
#epdrctn psuedoselectors
p.whatever-class-it-is {
position: relative;
text-align: center;
padding: 1.5em 0; //this controls the spacing between the rules
}
p.whatever-class-it-is:after, p.whatever-class-it-is:before {
content: '';
position: absolute;
left: 0;
@dvschultz
dvschultz / gist:7360953
Created November 7, 2013 20:02
ibooks javascript to determine which device you’re using ibooks on #eprdctn
$(document).ready(function() {
(function(){
//cache variables
var iw = $('html').width(),
wh = screen.height;
alert('screen height: '+ wh +', inner-width: ' + iw);
if (wh == 768 || wh == 1024) {
@dvschultz
dvschultz / gist:7611132
Created November 23, 2013 05:23
.jsx-ify mustache
/*!
* mustache.js - Logic-less {{mustache}} templates with JavaScript
* http://github.com/janl/mustache.js
*/
/*global define: false*/
/*
* This had to be altered from normal mustache.js to work with adobe DOM
@dvschultz
dvschultz / gist:8324974
Created January 8, 2014 21:26
Media Queries: Kindle Fire vs Kindle e-ink.
@media screen and (device-aspect-ratio:1/1) {
/* anything in here will work on Fires. Seriously. */
}
@media not all and (device-aspect-ratio:1/1) {
/* anything in here will work on e-inks */
}
@dvschultz
dvschultz / poem.html
Last active January 2, 2016 17:49 — forked from elmimmo/poem.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Styling a poem</title>
<style type="text/css">
html,body {
height: 100%;
width: 100%;
}
@dvschultz
dvschultz / gist:8692837
Created January 29, 2014 17:30
eBook hyphens
-epub-hyphens: none;
adobe-hyphenate: none;
-webkit-hyphens: none;
-moz-hyphens: none;
-ms-hyphens: none;
-o-hyphens: none;
hyphens: none;
//originally published here: http://www.pdsassoc.com/downloads/ReassertParaStyles.js.zip
//rewritten to be CC compliant
//DESCRIPTION: Visit all paragraphs in document and reassert paragraph styles
myStyles = app.activeDocument.allParagraphStyles;
app.findTextPreferences = null;
app.changeTextPreferences = null;
for (var n = 1; myStyles.length > n; n++){
app.findTextPreferences.appliedParagraphStyle = myStyles[n];
app.changeTextPreferences.appliedParagraphStyle = myStyles[n];