bower command not found windows

I bumped into this problem after npm install -g bower too. I solved the problem by adding npm’s binary folder to my path. Here are some helpful hints for doing that: Find the location of your npm global binaries: npm config get prefix. This path may look something like C:\Users\username\AppData\Roaming\npm (or C:\ProgramData\chocolatey\lib\nodejs.commandline.X.XX.XX\tools if you use … Read more

Max-Width vs. Min-Width

2 Part Answer Part 1: To answer “why people are using min-width over max-width?”: It has to do with design flow. Typically, with min-width patterns, you’re designing mobile-first. With max-width patterns, you’re design desktop-first. Going mobile-first with min-width, the default style is the mobile style. Queries after that then target progressively larger screens. body { … Read more

How can one import only variables and mixins from Sass stylesheets?

Imports are an all or nothing thing. Everything that’s in the file is what you get. If you look through the source of Foundation, though, there are variables you can modify that will suppress emitting styles (eg. in buttons, setting $include-html-button-classes to false will disable the styles). This design pattern is Foundation specific, you cannot … Read more

Full-screen responsive background image

http://css-tricks.com/perfect-full-page-background-image/ //HTML <img src=”https://stackoverflow.com/questions/16548338/images/bg.jpg” id=”bg” alt=””> //CSS #bg { position: fixed; top: 0; left: 0; /* Preserve aspet ratio */ min-width: 100%; min-height: 100%; } OR img.bg { /* Set rules to fill background */ min-height: 100%; min-width: 1024px; /* Set up proportionate scaling */ width: 100%; height: auto; /* Set up positioning */ position: … Read more

Using a function in Sass is returning the string containing the name of the function rather than the result

Your function doesn’t exist. You must declare it (or import it from another file) before you use it. Sass does not throw errors for non-existent functions because they have a similar syntax to CSS functions. So it assumes that if it isn’t a Sass function that it must be a CSS function. Related: Test whether … Read more

“Uncaught TypeError: a.indexOf is not a function” error when opening new foundation project

This error might be caused by the jQuery event-aliases like .load(), .unload() or .error() that all are deprecated since jQuery 1.8. Lookup for these aliases in your code and replace them with the .on() method instead. For example, replace the following deprecated excerpt: $(window).load(function(){…}); with the following: $(window).on(‘load’, function(){ …});