Skip to content

Instantly share code, notes, and snippets.

@paulirish
paulirish / bling.js
Last active May 1, 2024 19:56
bling dot js
/* bling.js */
window.$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn);
}
NodeList.prototype.__proto__ = Array.prototype;
@lonekorean
lonekorean / gist:7759870
Last active April 21, 2023 07:33
Gradient animation workaround
button {
background-image: linear-gradient(#5187c4, #1c2f45);
background-size: auto 200%;
background-position: 0 100%;
transition: background-position 0.5s;
/* ...and various other button styles */
}
button:hover {
@bomberstudios
bomberstudios / sketch-plugins.md
Last active February 26, 2024 07:02
A list of Sketch plugins hosted at GitHub, in no particular order.
@blackfalcon
blackfalcon / OOCSSvOOSCSS-SassCast.md
Last active December 15, 2015 11:49
OOCSS v OOSCSS - SassCast show notes

Hey everyone and welcome to another installemnt of SassCast.

In this episode I am going to talk about what I see as the main differences between vanilla CSS w/OOCSS and using Sass. To begin, I want to make sure that we are all clear on the definitions betwee Semantic and Presentations classes.

Semantic and Presentational classes

  • Presentational: purely visual. A presentational class will carry no meaning other then to describe the visual being applied to the HTML block.
  • Semantic: a taxonomy that carries meaning. A semantic class should make reference to the HTML block it is associated to. Example: .user-registration, or .billing-info

Ok, now that we have that out of the way, let's get into the principals of OOCSS. The good and the bad.

@kellishaver
kellishaver / SublimeBlockCursor.py
Created June 26, 2012 15:32
Sublime Text 2 Block Cursor - outside of Vintage Mode
import sublime
import sublime_plugin
class SublimeBlockCursor(sublime_plugin.EventListener):
def view_is_widget(view):
settings = view.settings()
return bool(settings.get('is_widget'))
def show_block_cursor(self, view):
validRegions = []
@liamcurry
liamcurry / gist:2597326
Created May 4, 2012 19:56
Vanilla JS vs jQuery

Moving from jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
@unruthless
unruthless / CSS for <sup> and <sub>
Created May 26, 2010 01:31
CSS for <sub> and <sup>
sub, sup {
/* Specified in % so that the sup/sup is the
right size relative to the surrounding text */
font-size: 75%;
/* Zero out the line-height so that it doesn't
interfere with the positioning that follows */
line-height: 0;
/* Where the magic happens: makes all browsers position