
Security News
Node.js TSC Declines to Endorse Feature Bounty Program
The Node.js TSC opted not to endorse a feature bounty program, citing concerns about incentives, governance, and project neutrality.
gradient2svg
Advanced tools
$ npm install gradient2svg
linear-gradient()
and radial-gradient()
import cssGradient2SVG from 'gradient2svg'
// Linear gradient
const svgGradient1 = cssGradient2SVG('linear-gradient(55deg, #f00, #000)');
/*
<linearGradient data-gradient-angle="55" x1="9.04%" y1="78.68%" x2="90.96%" y2="21.32%">
<stop offset="0%" style="stop-color: #f00;" /
<stop offset="100%" style="stop-color: #000;" />
</linearGradient>
*/
// Radial gradient
const svgGradient2 = cssGradient2SVG('radial-gradient(circle at 10% center, #f00 10%, #00f 95%)');
/*
<radialGradient cx="0.1" cy="0.5" r="50%">
<stop offset="10%" style="stop-color: #f00;" />
<stop offset="95%" style="stop-color: #00f;" />
</linearGradient>
*/
Currently, the <size>
keywords such as closest-side
, closest-corner
, farthest-side
, farthest-corner
, cover
and contain
that are describing a responsive size of a radial-gradient
in CSS are NOT supported because there is no way to describe this in plain SVG.
FAQs
Convert CSS gradients to a SVG gradients
The npm package gradient2svg receives a total of 0 weekly downloads. As such, gradient2svg popularity was classified as not popular.
We found that gradient2svg 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
The Node.js TSC opted not to endorse a feature bounty program, citing concerns about incentives, governance, and project neutrality.
Research
Security News
A look at the top trends in how threat actors are weaponizing open source packages to deliver malware and persist across the software supply chain.
Security News
ESLint now supports HTML linting with 48 new rules, expanding its language plugin system to cover more of the modern web development stack.