Skip to content

Instantly share code, notes, and snippets.

View grahamlicence's full-sized avatar

Graham Licence grahamlicence

  • 101 Ways
  • London
View GitHub Profile
@grahamlicence
grahamlicence / placeholder.css
Created March 25, 2013 12:08
Style placeholder text differently from input text
/*
article: http://blog.grahamlicence.co.uk/post/Styling-input-placeholder-CSS-to-differ-from-input.aspx
Note, when adding these styles they must be implemented seperately as the following not work in either browsers
*/
/* Chrome */
input::-webkit-input-placeholder {
font-style: italic;
}
@grahamlicence
grahamlicence / _retina.scss
Last active December 22, 2015 15:58
Retina Sass
/* mixin for retina background images */
@mixin background-image-retina($file, $type, $width, $height) {
width: $width+px;
height: $height+px;
background-image: image-url($file + '.' + $type);
background-repeat: no-repeat;
background-position: 0% 50%;
text-indent: -9999px;
overflow: hidden;
text-align: left;
/***
BASE STYLESHEET
The purpose of this style sheet is to provide a complete reset of styles and provide a few basic classes.
This stylesheet should be included on all pages (even if they drift from a standard template) and, as such,
does not contain any styles for the branding or layout. Branding and layout styles can be found in Generic.css.
@Authors
[
{ "keys": ["ctrl+tab"], "command": "next_view" },
{ "keys": ["ctrl+shift+tab"], "command": "prev_view" }
]
iframe {
max-width: 100%;
}
{
"font_size": 9,
"ignored_packages":
[
"Vintage"
],
"translate_tabs_to_spaces": true,
"tab_size": 4
}
@grahamlicence
grahamlicence / setup.md
Last active November 6, 2015 14:12
Machine setup

##Mac show hidden files

defaults write com.apple.finder AppleShowAllFiles YES

change git text editor

git config --global core.editor "nano"
@grahamlicence
grahamlicence / steps.md
Created April 3, 2014 11:22
Steps indicator styles
.steps {
    margin-bottom: 0.5em;
    margin-top: 1em;
    border-top: solid 1px $drkyellow;
    text-align: center;
    ul {
        list-style: none;
        padding: 0.5em;
        margin: -1.5em 0 0;
@grahamlicence
grahamlicence / animationend.js
Created June 23, 2014 14:19
Listening for animationend event cross browser (vanilla JavaScript)
var btn = document.querySelectorAll('button')[0],
animatedElement = document.querySelectorAll('.animated-element')[0],
animationEndEvent = null; // use this to check for support and trigger fallback
// feature detect which vendor prefix is used
(function getAnimationEventName () {
var testEl = document.createElement('div'),
transEndEventNames = {
'WebkitAnimation': 'webkitAnimationEnd',
'MozAnimation': 'animationend',
@grahamlicence
grahamlicence / index.html
Last active August 29, 2015 14:03
GitHub banner CSS SVG
<p class="footnote">Experiment by Graham licence. <a href="https://gist.github.com/grahamlicence/a4a5b2d21e4dfa2a9792" class="github">Fork me on GitHub</a></p>