Skip to content

Instantly share code, notes, and snippets.

@amitabhaghosh197
Last active September 9, 2017 15:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amitabhaghosh197/18bcecc6fe5396f227c926ad4d0d9694 to your computer and use it in GitHub Desktop.
Save amitabhaghosh197/18bcecc6fe5396f227c926ad4d0d9694 to your computer and use it in GitHub Desktop.
Some Important CSS Rules #css #sass

Placeholder color

input::-webkit-input-placeholder {
    color: #9B9B9B;
}

input:-ms-input-placeholder {
    color: #9B9B9B;
}

input::-moz-placeholder {
    color: #9B9B9B;
}

Always write the selectors before otherwise will not work. e.g input or textarea

Some beautifully arranged Positioned CSS rules in Bootstrap

http://demo.themeum.com/#cuisine

Grayscale CSS for all browsers

img.grayscale {
    filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#grayscale"); /* Firefox 10+, Firefox on Android */
    filter: gray; /* IE6-9 */
    -moz-filter:grayscale(100%);
  -webkit-filter:grayscale(100%);
  -o-filter:grayscale(100%);
  -ms-filter:grayscale(100%);
    }
    
    img.grayscale.disabled {
    filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'grayscale\'><feColorMatrix type=\'matrix\' values=\'1 0 0 0 0, 0 1 0 0 0, 0 0 1 0 0, 0 0 0 1 0\'/></filter></svg>#grayscale");
    -moz-filter:grayscale(0%);
  -webkit-filter:grayscale(0%);
  -o-filter:grayscale(0%);
  -ms-filter:grayscale(0%);
}
    

Reff:

  1. https://gist.github.com/karlhorky/3478370
  2. http://labs.voronianski.com/css3-grayscale/ 3.http://stackoverflow.com/questions/14813142/internet-explorer-10-howto-apply-grayscale-filter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment