Skip to content
ryndel edited this page Dec 27, 2012 · 8 revisions

Grayscale

Defaults

Grayscale: 1 (no color)

Usage

Import the grayscale mixin into the less file for your site or page:

@import "[path]/mixins/filters/grayscale.less";

OR using the absolute url:

@import "https://raw.github.com/commons/less/master/mixins/filters/grayscale.less"

Add grayscale to your style(s) using defaults:

.someclass {  
    .grayscale();  
}

Browser support

  • Chrome
  • Safari

Note: This is a -webkit feature - doesn't work in Firefox or IE.

Links

Demo

[View the grayscale.less file here] (https://raw.github.com/commons/less/master/mixins/filters/grayscale.less)

Clone this wiki locally