Skip to content

Instantly share code, notes, and snippets.

View zfdesign's full-sized avatar

ZFDesign zfdesign

  • ZFDesign
  • London, UK
View GitHub Profile
@cvrebert
cvrebert / css_regression_testing.md
Last active October 9, 2025 17:18
Survey of screenshot-based CSS testing tools

Currently considering https://github.com/webdriverio/webdrivercss


Core Goals:

  • Can test in up-to-date versions of all major browsers
  • Can test on up-to-date versions of all major OSes
  • Can test in IE9 (because Bootstrap v4 will support IE9+)
  • Don't want to have to setup/maintain our own cluster of VMs running all the necessary OSes (and all the versions of Windows)
  • Workflow for management of reference/baseline/norm screenshots
@addyosmani
addyosmani / README.md
Last active October 2, 2025 12:05 — forked from 140bytes/LICENSE.txt
108 byte CSS Layout Debugger

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

@pburtchaell
pburtchaell / styles.css
Last active February 12, 2025 08:45
VH and VW units can cause issues on iOS devices. To overcome this, create media queries that target the width, height, and orientation of iOS devices.
/**
* VH and VW units can cause issues on iOS devices: http://caniuse.com/#feat=viewport-units
*
* To overcome this, create media queries that target the width, height, and orientation of iOS devices.
* It isn't optimal, but there is really no other way to solve the problem. In this example, I am fixing
* the height of element `.foo` —which is a full width and height cover image.
*
* iOS Resolution Quick Reference: http://www.iosres.com/
*/
@nikcorg
nikcorg / berlin-jsconf-2014.md
Last active August 4, 2023 12:45
Slide decks of JSConf 2014
@addyosmani
addyosmani / array.prototype.fill.js
Last active May 31, 2016 19:16
ES6 Array.prototype.fill() polyfill
if ( ![].fill) {
Array.prototype.fill = function( value ) {
var O = Object( this );
var len = parseInt( O.length, 10 );
var start = arguments[1];
var relativeStart = parseInt( start, 10 ) || 0;
var k = relativeStart < 0
? Math.max( len + relativeStart, 0)
: Math.min( relativeStart, len );
anonymous
anonymous / Slider-like-Yahoo-Weather-App.markdown
Created October 22, 2013 12:39
A Pen by Chris Coyier.
@Integralist
Integralist / Imager.js
Last active December 21, 2015 01:38
Imager.js (as of 14th August 2013)
(function (window, document) {
'use strict';
var $, Imager;
window.requestAnimationFrame =
window.requestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.webkitRequestAnimationFrame ||
@leostratus
leostratus / webkit-pseudo-elements.md
Created September 21, 2012 01:44
Webkit Pseudo-Element Selectors (Shadow DOM Elements)

An ongoing project to catalogue all of these sneaky, hidden, bleeding edge selectors as I prepare my JSConf EU 2012 talk.

Everything is broken up by tag, but within each the selectors aren't particularly ordered.

I have not tested/verified all of these. Have I missed some or got it wrong? Let me know. - A

A friendly reminder that you may need to set this property on your target/selected element to get the styling results you want:

-webkit-appearance:none;

@connor
connor / .jshintrc.js
Created January 11, 2012 22:20
jshintrc example
// NOTE: I added the .js extension to this gist so it would have syntax highlighting. This file should have NO file extension
{
// Settings
"passfail" : false, // Stop on first error.
"maxerr" : 100, // Maximum error before stopping.
// Predefined globals whom JSHint will ignore.
"browser" : true, // Standard browser globals e.g. `window`, `document`.
@dawsontoth
dawsontoth / app.js
Created February 25, 2011 18:14
Styling windows with native Android activities
// open a heavyweight window
var win = Titanium.UI.createWindow({ backgroundColor: '#fff', fullscreen: true });
win.add(Ti.UI.createLabel({ text: 'Press your hardware menu button!' }));
win.open();
// keep a pointer to the current activity
var currentActivity = win.activity;
// and make an options menu
currentActivity.onCreateOptionsMenu = function(e) {