Skip to content

Instantly share code, notes, and snippets.

View tilomitra's full-sized avatar
👋

Tilo Mitra tilomitra

👋
View GitHub Profile
/**
* This module is the conditional loaded `dd` module to support gesture events
* in the event that `dd` is loaded onto a device that support touch based events.
*
* This module is loaded and over rides 2 key methods on `DD.Drag` and `DD.DDM` to
* attach the gesture events. Overrides `DD.Drag._prep` and `DD.DDM._setupListeners`
* methods as well as set's the property `DD.Drag.START_EVENT` to `gesturemovestart`
* to enable gesture movement instead of mouse based movement.
* @module dd
@tilomitra
tilomitra / Gruntfile.js
Last active January 2, 2016 15:09
updated grunt-stripmq to work with css-media-match
'use strict';
module.exports = function (grunt) {
// Project configuration.
grunt.initConfig({
jshint: {
all: [
'Gruntfile.js',
'tasks/**/*.js'
],
.pure-u-1,
.pure-u-1-1,
.pure-u-1-2,
.pure-u-1-3,
.pure-u-2-3,
.pure-u-1-4,
.pure-u-3-4,
.pure-u-1-6,
.pure-u-5-6,
.pure-u-1-8,
@tilomitra
tilomitra / grid.css
Created December 18, 2013 20:02
Example of mobile-first Pure Grid
.pure-u-1-12,
.pure-u-1,
.pure-u-1-6,
.pure-u-1-1,
.pure-u-1-4,
.pure-u-1-2,
.pure-u-1-3,
.pure-u-2-12,
.pure-u-2-3,
.pure-u-3-4,
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.3.0/pure-min.css">
<style>
.box {
width: 150px;
@tilomitra
tilomitra / yuiconf-2013-carousel.html
Last active December 27, 2015 13:29
A carousel that highlights various gesture events that are upcoming in YUI. View it live here: http://rawgithub.com/tilomitra/7333549/raw/9ea70721628531b8e6720a2b73ca76ac73de2f19/yuiconf-2013-carousel.html
@tilomitra
tilomitra / mixins.scss
Last active December 26, 2015 13:29
Extending Pure components using pre-processors.
@mixin pure-form {
input {
padding: 0.5em 0.6em;
display: inline-block;
border: 1px solid #ccc;
font-size: 0.8em;
box-shadow: inset 0 1px 3px #ddd;
border-radius: 4px;
-webkit-transition: 0.3s linear border;
-moz-transition: 0.3s linear border;
@tilomitra
tilomitra / responsive-menu.css
Created September 26, 2013 23:54
This gist makes Pure Menus easier to customize, and adds a new responsive menu that collapses. Check out this pull request for details: https://github.com/yui/pure/pull/142 This is BETA!
/*!
Pure 0.3.0
Copyright 2013 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
https://github.com/yui/pure/blob/master/LICENSE.md
*/
/*csslint adjoining-classes: false, box-model:false*/
.pure-menu ul, .pure-menu li {
position: relative;
}
@tilomitra
tilomitra / mobile-first-grid.css
Created September 26, 2013 23:51
A mobile-first grid for Pure. This pull request has more information on how to use it. Ping me if you run into issues. This is BETA! https://github.com/yui/pure/pull/146
.pure-g {
letter-spacing: -0.31em; /* Webkit: collapse white-space between units */
*letter-spacing: normal; /* reset IE < 8 */
*word-spacing: -0.43em; /* IE < 8: collapse white-space between units */
text-rendering: optimizespeed; /* Webkit: fixes text-rendering: optimizeLegibility */
/*
Sets the font stack to fonts known to work properly with the above letter
and word spacings. See: https://github.com/yui/pure/issues/41/