Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@db-ui/gif
Advanced tools
If you have custom icons and want to use them for foundations and/or in components, you need to generate a woff2
file.
For this run:
npx @db-ui/gif --src ./my-path-to/icons --fontName my-name
We search for all **/*.svg
files inside the src
directory and create a new icon font with the provided name. You can preview all generated icons here: ./my-path-to/icons/fonts/all/index.html
.
NOTE: We use four different sizes for components (16, 20, 24, 32) to show more or less details. You can do the same by providing another file with a size suffix for example "icon_file_name_16.svg".
For more information run:
npx @db-ui/gif --help
In your app you need to include some of the generated files:
./my-path-to/icons/fonts/my-name.woff2 ./my-path-to/icons/fonts/font-face.css
NOTE: In case you put the files in a separate folder of your
public
directory be aware to adopt the path in your generatedfont-face.css
file:url("/{YOUR_FOLDER}}/my-name.woff2?t=1698750286189") format("woff2");
NOTE: The source files need to provide the following attributes: width, height and viewbox to generate the icon font correctly
Now you can use your icons with your font-family: my-name
, e.g.:
<!--example.html-->
<i class="my-name">icon_file_name</i>
When using scss
you can also use @forward
to include the generated files:
@forward "public/font-face";
If you like to use a custom icon in one of our components you can do it by overwriting the default font-family like this:
<!--example.html-->
<p class="icon-family-my-name" data-icon="icon_file_name">Test</p>
<!-- or -->
<p data-icon-family="my-name" data-icon="icon_file_name">Test</p>
You can overwrite custom-icons for our components with CSS as well:
.db-button {
--db-icon-font-family: "my-name";
}
FAQs
'gif' or 'generate icon fonts' uses svgs to generate woff2 files
The npm package @db-ui/gif receives a total of 16 weekly downloads. As such, @db-ui/gif popularity was classified as not popular.
We found that @db-ui/gif demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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 uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.