Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

drop-shadow-converter

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

drop-shadow-converter

Convert Photoshop Drop Shadows to CSS3 Box & Text Shadows - See more at: http://www.melanieceraso.com/psd-to-css3/

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6
increased by200%
Maintainers
1
Weekly downloads
 
Created
Source

#drop-shadow-converter Convert Photoshop Drop Shadows to CSS3 Box & Text Shadows - See more at: http://www.melanieceraso.com/psd-to-css3/ Use original photoshop drop shadow in your less or scss.

##Less

@import "../less/drop-shadow-converter";

/* just color */
div {
  .dropShadowConverter(#123);
  box-shadow: @boxShadow;
  text-shadow: @textShadow;
}

/* opacity */
div {
  .dropShadowConverter(#000, @opacity: 25%);
  box-shadow: @boxShadow;
  text-shadow: @textShadow;
}

/* distance */
div {
  .dropShadowConverter(#000, @distance: 10px);
  box-shadow: @boxShadow;
  text-shadow: @textShadow;
}

/* distance and angle */
div {
  .dropShadowConverter(#000, @angle: 45, @distance: 10px);
  box-shadow: @boxShadow;
  text-shadow: @textShadow;
}

/* spread and size */
div {
  .dropShadowConverter(#000, @spread: 15, @size: 15px);
  box-shadow: @boxShadow;
  text-shadow: @textShadow;
}

/* all together */
div {
  .dropShadowConverter(#123, @angle: 45, @distance: 10px, @spread: 15, @size: 15px, @opacity: 25%);
  box-shadow: @boxShadow;
  text-shadow: @textShadow;
}

##SCSS

// math functions are not included in sass
@import "../scss/mathfunctions";
// import converter
@import "../scss/drop-shadow-converter";

/* just color */
div {
  box-shadow: drop-shadow-converter(#123);
  text-shadow: drop-shadow-converter(#123, $is-text-shadow: true);
}

/* opacity */
div {
  box-shadow: drop-shadow-converter(#000, $opacity: 25%);
  text-shadow: drop-shadow-converter(#000, $opacity: 25%, $is-text-shadow: true);
}

/* distance */
div {
  box-shadow: drop-shadow-converter(#000, $distance: 10px);
  text-shadow: drop-shadow-converter(#000, $distance: 10px, $is-text-shadow: true);
}

/* distance and angle */
div {
  box-shadow: drop-shadow-converter(#000, $angle: 45, $distance: 10px);
  text-shadow: drop-shadow-converter(#000, $angle: 45, $distance: 10px, $is-text-shadow: true);
}

/* spread and size */
div {
  box-shadow: drop-shadow-converter(#000, $spread: 15, $size: 15px);
  text-shadow: drop-shadow-converter(#000, $spread: 15, $size: 15px, $is-text-shadow: true);
}

/* all together */
div {
  box-shadow: drop-shadow-converter(#123, $angle: 45, $distance: 10px, $spread: 15, $size: 15px, $opacity: 25%);
  text-shadow: drop-shadow-converter(#123, $angle: 45, $distance: 10px, $spread: 15, $size: 15px, $opacity: 25%, $is-text-shadow: true);
}

Keywords

FAQs

Package last updated on 07 May 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc