- Node.js installieren / direkter Download Link
- Gulp.js global installieren: Terminal:
(sudo) npm install -g gulp
- Die Node Module vom Git ausschließen: in der Datei
.gitignore
folgendes ergänzennode_modules/*
- Ins Projekt Verzeichnis wechseln
- Erstmalig:
npm init
ausführen, evtl Infos eingeben und Bestätigen - Gulp.js für das Projekt installieren:
(sudo) npm install --save-dev gulp
- Benötigte Plugins installieren:
(sudo) npm install gulp-sass gulp-notify browser-sync --save-dev
- Datei
gulpfile.js
im Projekt Ordner anlegen und konfigurieren (siehe anderes Gist)
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.3.14) | |
// Compass (v1.0.1) | |
// ---- | |
$map--colors: ( | |
blue : #0066cc, | |
blue--light : #15b3fc, | |
grey : #575757, | |
grey--dark : #4a4a4a, |
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
/******************************************************************************* | |
* Placehoder Styling | |
*******************************************************************************/ | |
@mixin placeholder { | |
&::-webkit-input-placeholder { @content; } | |
&:-moz-placeholder { @content; } // Firefox 18- | |
&::-moz-placeholder { @content; } // Firefox 19+ | |
&:-ms-input-placeholder { @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
/******************************************************************************* | |
* DEPENDENCIES | |
*******************************************************************************/ | |
var gulp = require('gulp'); | |
var sass = require('gulp-sass'); | |
var minifycss = require('gulp-minify-css'); | |
var rename = require('gulp-rename'); | |
var jshint = require('gulp-jshint'); | |
var concat = require('gulp-concat'); |
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
/******************************************************************************* | |
* DEPENDENCIES | |
*******************************************************************************/ | |
var gulp = require('gulp'); | |
var sass = require('gulp-sass'); | |
var notify = require('gulp-notify'); | |
var browserSync = require('browser-sync'); | |
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
// Quelle: http://grochtdreis.de/weblog/2014/01/27/browserabfrage-zu-jquery-zurueckholen/ | |
// bringt $browser zum modernen jQuery zurück | |
// brings back $.browser to modern jQuery | |
jQuery.browser={}; | |
(function(){ | |
jQuery.browser.msie=false; | |
jQuery.browser.version=0; | |
if(navigator.userAgent.match(/MSIE ([0-9]+)\./)){ | |
jQuery.browser.msie=true;jQuery.browser.version=RegExp.$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
// http://stackoverflow.com/questions/5228459/selector-count-in-css | |
// The following snippet can be run in the Firebug console in Firefox to count | |
// the total number of CSS selectors (not just CSS rules) and check whether | |
// it reaches the limit of 4095 selectors per stylesheet: | |
var | |
styleSheets = document.styleSheets, | |
totalStyleSheets = styleSheets.length; | |
for (var j = 0; j < totalStyleSheets; j++){ |
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
/* | |
** Perfect Full Page Background Image | |
** http://css-tricks.com/perfect-full-page-background-image/ | |
** | |
** UPDTAE: background-attachment: fixed; führt bei iOS zu Problemen | |
** http://codepen.io/larswittenberg/pen/zlEsL | |
*/ | |
.background-image { | |
position: fixed; |
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
/* | |
http://davidwalsh.name/firefox-buttons | |
*/ | |
input::-moz-focus-inner { | |
border: 0; | |
padding: 0; | |
margin-top:-2px; | |
margin-bottom: -2px; | |
} |
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
// Source: http://iamskwerl.com/tech/2012/11/flash-detection-with-one-line-of-javascript/ | |
var hasFlash = navigator.mimeTypes && navigator.mimeTypes.length ? Array.prototype.slice.call(navigator.mimeTypes).some(function(a) { return "application/x-shockwave-flash" == a.type; }) : /MSIE/.test(navigator.userAgent) ? eval("try { new ActiveXObject('ShockwaveFlash.ShockwaveFlash') && !0 } catch(e) { !1 };") : !1; |
NewerOlder