how could I includes only a few icons from the bootstrap-icons project?
I have added the project to my dependencies (yarn add bootstrap-icons
) and searching in it I can see that it has a sass file with a giant map variable "$bootstrap-icons-map" I won't include all icons, sooo, how could I includes only some icons its there any way defined?
how includes only a few icons from bootstrap-icons?
718 Views Asked by jon_eldiablo At
1
There are 1 best solutions below
Related Questions in SASS
- Do I have to randomize key in OpenSSL
- An exception of type 'System.Security.Cryptography.CryptographicException': keyset does not exist
- crypto.BadPaddingException: data hash wrong (EKYC-Response)
- Decrypted string returns "Length of the data to decrypt is invalid"
- Generate signature using private key with OpenSSL API
- Recovering an ECPublicKey from Java to JavaCard
- Proxy tool for CoAP integrated with DTLS
- Using CmsEnvelopedData with CmsSignedData to verify signed data
- Unchecked returned value causing unexpected states and conditions
- SQL-Server Verify SHA2_512 hash procedure
Related Questions in BOOTSTRAP-ICONS
- Do I have to randomize key in OpenSSL
- An exception of type 'System.Security.Cryptography.CryptographicException': keyset does not exist
- crypto.BadPaddingException: data hash wrong (EKYC-Response)
- Decrypted string returns "Length of the data to decrypt is invalid"
- Generate signature using private key with OpenSSL API
- Recovering an ECPublicKey from Java to JavaCard
- Proxy tool for CoAP integrated with DTLS
- Using CmsEnvelopedData with CmsSignedData to verify signed data
- Unchecked returned value causing unexpected states and conditions
- SQL-Server Verify SHA2_512 hash procedure
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
You can do it manually. You can create a web icon font from yourself: I use often this tool: https://fontello.com/ You can take the bootstrap-icons you want from here : https://icons.getbootstrap.com/
and drag and drop into the previous tool fontello. You have to set your font-name and customize icon-names and code. Now you are ready to download your web icon font (top right download button). In that folder you will have the subfolder
font
with your custom web-icon-font. Inside subfoldercss
you will find theyour-font-name
.css file and inside it you will find the rules to include your web icon font (@font-face rule, bring this rule inside your css) and the rules to include the icons with the class bi-icon-name
(you have to do this customization inside fontello, namely change the prefix (default prefix is icon- , change to bi-) and the icons-name).Now you can put the bootstrap-icons rules too inside your css/sass :
And now you can do:
<i class="bi bi-nome-mia-icona></i>
This approach can seems intimitadatory but is pretty simple.
Another possibility is to build an svg icon font, this has a series of advantages against web icon font, for example if you have few icons you can embedd your svg icon font inside your html page and save an http request and the download but if you have several icons your html page could become too big, in this case the svg icon font should be extern and in this case there are a lot of problems to handle it. If you want more insight about how to create an svg icon font tell me.
Last but not least, you could use svg inline. For example put this directly into your html for yin-yang icon:
In this case you haven't to include cdn, neither import anything. It's enough the svg inline that you can find for all the pther icons here (clicking on the icons) https://icons.getbootstrap.com/:
I hope this help you.