Skip to content

Instantly share code, notes, and snippets.

View jordandobson's full-sized avatar
🥽

Jordan Dobson jordandobson

🥽
View GitHub Profile
@marcedwards
marcedwards / high-dpi-media.css
Last active November 19, 2023 12:56
A CSS media query that captures almost all high DPI aware devices.
/* ---------------------------------------------------------- */
/* */
/* A media query that captures: */
/* */
/* - Retina iOS devices */
/* - Retina Macs running Safari */
/* - High DPI Windows PCs running IE 8 and above */
/* - Low DPI Windows PCs running IE, zoomed in */
/* - Low DPI Windows PCs and Macs running Firefox, zoomed in */
/* - Android hdpi devices and above */
@irae
irae / _Stay_standalone.md
Last active January 29, 2024 12:38 — forked from kylebarrow/example.html
Stay Standalone: Prevent links in standalone web apps opening Mobile Safari

#Stay Standalone

A short script to prevent internal links to a "webapp" added to iPhone home screen to open in Safari instead of navigating internally.

@jordandobson
jordandobson / CLS.js
Created June 8, 2011 00:15
Mobile JavaScript Library for HTML Class Attribute Manipulation
(function(document){
window.CLS = window.CLS || {};
CLS.add = function(el, cn){
if(!CLS.exists(el, cn)){
el.className = el.className ? el.className + ' ' + cn : cn;
}
}
@jordandobson
jordandobson / vignette.css
Created November 25, 2010 09:28
Examples of adding a Vignette to Photos with CSS3 Gradients. Code sampled from: http://cl.ly/3Nxc
/* Border & Vignette Setup */
figure{
position: relative;
display: block;
line-height: 0;
width: 500px;
height: 333px;
margin-bottom: 2em;
border: 1em solid #fff;