
Research
Security News
Malicious PyPI Package Exploits Deezer API for Coordinated Music Piracy
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
@stackoverflow/stacks-icons
Advanced tools
The icon library for Stack Overflow, Stack Overflow Careers, and the Stack Exchange Network.
This repo provides authoring tools for building Stack Overflow’s shared icon library. Here’s our general workflow:
FIGMA_ACCESS_TOKEN=<TOKEN> npm start
.This will download any components from the Figma file as SVGs and build optimized SVGs (using SVGO) in the build/lib
directory. Some manifest files are included in build
as well.
In order to use this repo, you must first install Node & NPM. Then, open this repo’s directory in your Terminal. Once you’re in this repo’s folder, type npm install
. This will download all the dependencies.
Stacks Icons are delivered via NPM. It can be installed with npm i @stackoverflow/stacks-icons
In certain cases where adding the raw svg markup to your html would cause bloat or if you need your markup to be more portable, consider using CSS icons. Note: Not all icons are available as CSS icons.
<!-- include the required css file -->
<link rel="stylesheet" href="/path/to/cssIcons.css" />
<!-- add the "svg-icon-bg" class in addition the desired "iconNAME" class -->
<span class="svg-icon-bg iconBold"></span>
<!-- the icon's color matches the "currentColor", so changing the "color" property will change the icon color -->
<span class="svg-icon-bg iconFire" style="color: red;"></span>
<!-- add the "native" class to get native styles; these do not respect "currentColor" changes -->
<span class="svg-icon-bg iconFaceMindBlown native"></span>
You can add support for more CSS icons my editing the src/cssIcons.json
file. Supported formats:
"Bold"
)name
- the name of the icon (e.g. "Bold"
)css
- arbitrary css to add to the icon class (e.g. "width: 14px; height: 14px;"
)Note: This is not intended to be used in production.
If you include the index.js
within your prototype’s body
element (<script src="https://unpkg.com/@stackoverflow/stacks-icons"></script>
) you can render Stacks Icons in the browser using only the following format:
<svg data-icon="FaceMindBlown" class="native"></svg>
<svg data-spot="Search"></svg>
This package looks out for elements that look like svg[data-icon]
. If the icon doesn’t exist in Stacks, it will throw you an error in console. Anything in the class=""
attribute will be passed to the included SVG e.g., native
@Svg
helperThis might be useful if you want to convert a large prototype to use the Razor helper.
Find
<svg data-icon="(.+?)" class="(.+?)"></svg>
Replace
@Svg.$1.With("$2")
import Icons from "stacks-icons";
console.log(Icons.FaceMindBlown);
// Returns <svg>...</svg>
First, you'll need a Figma personal access token. Once you have that, place it in a .env
file in the root of the repo:
FIGMA_ACCESS_TOKEN="your_access_token_here"
Run the build locally via:
npm run build
In order to run the dotnet package's tests locally, you'll need to first run the general build script above, as the dotnet solution pulls the generated csharp files from the build directory.
In order to ensure that any new icons/spots in Figma are pulled into this repo, the definitions will need to be added to src/definitions.ts
:
const figmaIconDefinitions = {
// ...
"Icon/IconName": "",
// ...
};
When adding new entries, please ensure that all entries are in alphabetical order for ease of reference. The initial value is ok to leave empty. Once you run the first build process, it'll throw an error like the following:
Hash mismatch on 1 files. Expected hash values: "Icon/Accessibility": "ksqXzQjdToAghXkIQ75PE/8qRdUho8Wtux1FTo+mgug=",
Take this hash value and use it as the value for the previously added entry. Re-run the build process and verify that your new icon is added correctly and has the correct contents.
When updating an existing icon, just update the hash as explained in the previous section.
See https://icons.stackoverflow.design/ for an up-to-date list of all icons and spots.
Stacks-Icons also provides a NuGet package that targets netstandard2.0
.
See the <dotnet/src/README.md> file for more details.
FAQs
The icon library for Stack Overflow, Stack Overflow Careers, and the Stack Exchange Network.
The npm package @stackoverflow/stacks-icons receives a total of 1,477 weekly downloads. As such, @stackoverflow/stacks-icons popularity was classified as popular.
We found that @stackoverflow/stacks-icons demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 6 open source maintainers 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.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.
Security News
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.