Using Elixir with Laravel

Published on

Elixir is a wrapper around Gulp that creates useful syntax. package.json is the node equivalent of composer.json. npm install is the node equivalent of composer install. Preliminary setup: Install Node on you system. sudo apt-get update sudo apt-get install nodejs sudo apt-get install npm sudo apt-get install libnotify-bin sudo ln -s /usr/bin/nodejs /usr/bin/node Install Gulp … Continue reading Using Elixir with Laravel

JavaScript: insertRule

Published on

/* Inserts a CSS style rule. Usage: sheet.insertRule(“header { float: left; opacity: 0.8; }”, 1);false reference: http://davidwalsh.name/essential-javascript-functions */ var sheet = (function() { // Create the <style> tag var style = document.createElement(‘style’); // Add a media (and/or media query) here if you’d like! // style.setAttribute(‘media’, ‘screen’) // style.setAttribute(‘media’, ‘only screen and (max-width : 1024px)’) // … Continue reading JavaScript: insertRule

CSS: clearfixHack

Published on

/* Float Clearing http://nicolasgallagher.com/micro-clearfix-hack */ .group:after { content: ” “; /* 1 */ display: table; /* 2 */ clear: both; } .group { *zoom: 1; /* 3 */ }