![Namecheap Takes Down Polyfill.io Service Following Supply Chain Attack](https://cdn.sanity.io/images/cgdhsj6q/production/6af25114feaaac7179b18127c83327568ff592d1-1024x1024.webp?w=800&fit=max&auto=format)
Security News
Namecheap Takes Down Polyfill.io Service Following Supply Chain Attack
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
shadow-scss
Advanced tools
Readme
A set of two Sass functions (box-shadow()
and text-shadow()
) to write multiple shadows.
With npm,
npm install shadow-scss
or just copy the content of the _shadow.scss
file into your Sass directory.
With npm,
@import "shadow-scss";
or just @import
the _shadow.scss
partial into your Sass project.
box-shadow()
box-shadow: box-shadow(
$color: #000,
$step: 2px,
$count: 10
)
text-shadow()
text-shadow: text-shadow(
$color: #ccc,
$stepX: -.5px,
$stepY: .5px,
$count: 50
)
For $x
, $y
, $blur-radius
, $spread-radius
, $color
, $step
, $stepX
and $stepY
, custom functions can also be passed through, when writing multiple shadows. These functions are called with 2 parameters ($i
and $count
) and can be defined as,
@function func-name($i, $count) {
@return calc($i / $count) * 5px;
}
where $i
denotes the nth shadow and $count
is the total number of shadows which was initially defined.
Parameter | box-shadow() | text-shadow() | Default Value | Description |
---|---|---|---|---|
$inset | ☑ | ☒ | false | Boolean value that specifies if the inset keyword is to be included or not. |
$x | ☑ | ☑ | 0 | Number or Function that specifies the horizontal distance. |
$y | ☑ | ☑ | 0 | Number or Function that specifies the vertical distance. |
$blur-radius | ☑ | ☑ | 0 | Number or Function that specifies the blur amount. |
$spread-radius | ☑ | ☒ | 0 | Number or Function that specifies the spread amount. |
$color | ☑ | ☑ | #000 | Color or Function that specifies the color. |
$step | ☑ | ☑ | 0 | Number or Function that specifies the horizontal and the vertical difference between the distances of the shadows. |
$stepX | ☑ | ☑ | null | Number or Function that specifies the horizontal difference between the distances of the shadows. If its value is null (default), the value of $step is used. |
$stepY | ☑ | ☑ | null | Number or Function that specifies the vertical difference between the distances of the shadows. If its value is null (default), the value of $step is used. |
$count | ☑ | ☑ | 1 | Number that specifies the number of shadows to be written. |
Refer to the MDN Web Docs for box-shadow
and text-shadow
for a better understanding of the native parameters.
MIT © Utkarsh Verma
FAQs
[npm-image]: https://img.shields.io/npm/v/shadow-scss.svg [npm-url]: https://npmjs.org/package/shadow-scss [license-image]: https://img.shields.io/github/license/n3r4zzurr0/range-slider-input.svg [license-url]: https://github.com/n3r4zzurr0/range-slider-i
The npm package shadow-scss receives a total of 1 weekly downloads. As such, shadow-scss popularity was classified as not popular.
We found that shadow-scss demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.
Security News
A JavaScript library maintainer is under fire after merging a controversial PR to support legacy versions of Node.js.