A Pen by Dave Rupert on CodePen.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Chrome 32/33 webfont issue fix. | |
* Requires jQuery. | |
* More info: http://blog.cloudfour.com/chrome-webfont-issues/ | |
*/ | |
(function($, window){ | |
// only proceed if this is Chrome | |
if (window.navigator.userAgent.indexOf('Chrome') === -1) return; | |
// only proceed if the version is 32 or greater |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<title>Datalist test</title> | |
<meta charset="utf-8"> | |
<form> | |
<label for="source">How did you hear about us?</label> | |
<datalist id="sources"> | |
<select name="source"> | |
<option>please choose...</option> | |
<option value="television">Television</option> | |
<option value="radio">Radio</option> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.matchMedia = window.matchMedia || (function(doc, undefined){ | |
var bool, | |
docElem = doc.documentElement, | |
refNode = docElem.firstElementChild || docElem.firstChild, | |
// fakeBody required for <FF4 when executed in <head> | |
fakeBody = doc.createElement('body'), | |
div = doc.createElement('div'); | |
div.id = 'mq-test-1'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Single point of breakpoint-definition</title> | |
<style> | |
/* | |
Baseline: | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin background-2x($background, $file: 'png'){ | |
$image: #{$background+"."+$file}; | |
$image2x: #{$background+"2x."+$file}; | |
background: image-url($image) no-repeat; | |
@media (min--moz-device-pixel-ratio: 1.3), | |
(-o-min-device-pixel-ratio: 2.6/2), | |
(-webkit-min-device-pixel-ratio: 1.3), | |
(min-device-pixel-ratio: 1.3), | |
(min-resolution: 1.3dppx){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin respond-to($media) { | |
if $media == medium-screens { | |
@media only screen and (min-width: $breakMedium + 1) { @content; } | |
} | |
@else if $media == wide-screens { | |
@media only screen and (min-width: $breakLarge + 1) { @content; } | |
html.lt-ie9 & { // Using Paul Irish's conditional comments for IE8 and below | |
@content; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// --- | |
// Sass (v3.2.9) | |
// --- | |
@mixin respond-to($queries...) { | |
$length: length($queries); | |
@for $i from 1 through $length{ | |
@if $i % 2 == 1 { | |
@media screen and (min-width: nth($queries, $i)) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Initialize the Sass variables and partials used in this project. | |
// Set the legacy IE support variables. We override the default values set by | |
// the compass/support partial, but let styles-ie8.scss override these values. | |
$legacy-support-for-ie6 : false !default; | |
$legacy-support-for-ie7 : false !default; // Note the use of !default. | |
$legacy-support-for-ie8 : false !default; | |
// Partials to be shared with all .scss files. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin split($selectors...) { | |
@each $selector in $selectors { | |
#{$selector} { | |
@content; | |
} | |
} | |
} |
OlderNewer