
Security News
ECMAScript 2025 Finalized with Iterator Helpers, Set Methods, RegExp.escape, and More
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
bootstrap-icons-sass
Advanced tools
A Sass wrapper of [Bootstrap Icons](https://icons.getbootstrap.com/).
A Sass wrapper of Bootstrap Icons.
By embedding svgs into css, you can avoid using web fonts. This package helps you to embed svgs into css.
First, install this package.
npm install bootstrap-icons-sass
Next, use this in your project.
<p><span class="bi-alarm" style="font-size: 2rem; color: cornflowerblue;"></i></p>
.bi-alarm
@include bi-alarm
This sass provides one function and one mixin for each icon.
Each functions returns svg url with the specified fill color.
@function bi-check-circle-fill($fill: #000)
@return 'data:image/svg+xml,' + bi-escape-svg('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="' + $fill + '">...</svg>')
Each mixin provides a sass to replace the existing bootstrap with the icon font.
This mixin uses an icon svg as a mask image, and this mixin uses currentColor
as an icon color.
To change the icon color, change the color
property of the element, or set the color to the fill
argument.
@mixin bi-check-all($fill: currentColor, $size: 1em, $icon-size: 100%)
content: ''
display: inline-block
width: $size
height: $size
mask-size: $icon-size $icon-size
mask-position: center
mask-repeat: no-repeat
background-color: $fill
transform: translateY($size * 0.15)
mask-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">...</svg>')
This sass does not provide vendor-prefixed properties. If necessary, you can use some libraries such as PostCSS Preset Env.
This package is released under the MIT License.
Feel free to create GitHub issues or pull requests.
FAQs
A Sass wrapper of [Bootstrap Icons](https://icons.getbootstrap.com/).
The npm package bootstrap-icons-sass receives a total of 4 weekly downloads. As such, bootstrap-icons-sass popularity was classified as not popular.
We found that bootstrap-icons-sass 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
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.
Research
North Korean threat actors linked to the Contagious Interview campaign return with 35 new malicious npm packages using a stealthy multi-stage malware loader.