Home

Awesome

LESSHat Dev Stack documentation

Instalation

  1. Download lesshat repository
  2. npm install
  3. Code!

Grunt tasks

  1. grunt – for production. It will prompt you for new version, update package.json, bower.json, header inside lesshat.less and also create git tag. Then it builds mixins from mixins folders, test them and also it create prefixed version. Finally it builds documentation. Don't use it for contribution.
  2. grunt contrib – for contribution. It's the same like the one above, but doesn't prompt you for new version. Use this for contribution
  3. grunt version – changes version in package.json, bower.json and in lesshat.less and lesshat-prefixed.less files and it also creates git tag. Don't use it for contribution.
  4. grunt generate – mixin generator. It creates folder, mixin file, test file and also doc file. Please use it for creating new mixins.
  5. grunt dev – great for development. It just builds mixins and test them.
  6. grunt build – awesome for development. It just builds mixins.

About mixins

Mixins API

Full mixin example

	/**
	* animationName mixin
	*/

	var animationName = function animationName(value) {
		return value || 'none';
	};

	/**
	* For which browsers is this mixin specified
	*/

	animationName.vendors = ['webkit', 'moz', 'opera'];

	/**
	* Export mixin
	*/

	module.exports = animationName;

LESS-only Mixins

There is definitely a lot of mixins that do not require any JavaScript-based processing of input arguments and a simple LESS file is all that's needed.

You can create mixins/%name%/%name%.less files instead of JavaScript files and their contents will be simply copied to the resulting LESS file.

.size(@width, @height) {
	width: @width;
	height: @height;
}