question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Provide font-family format

See original GitHub issue

The “You can also use the SVG within your CSS” use case doesn’t allow for color customization without touching the SVG fill value. We should be able to dynamically load the untouched source SVGs and customize them via css only (like when you import Bootstrap without modifying it and properly override variables), which would be possible via a font-family approach (allowing the use of Bootstrap color variables for proper icons theming). Is this in the pipeline?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:16
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
nikhil-bhandaricommented, Mar 23, 2020

I have been using bootstrap since 2.X and recently switched from 3.X to 4.X for a new project and noticed that icons are in a different repository now and in order to include them you need to copy the svg code from the website and then use it.

I’m trying to get used to it, but I would love to see something similar to the old way of using icons.

Some features that I loved about old system

  1. Adding any icon was as simple as writing following line of code.
    <i class="glyphicon glyphicon-trash"></i>
  1. There was no need to access the documentation to lookup icons. Modern IDE’s helped with autocomplete and since icon names are easy to remember often I could simply type the classname and use straightaway.

  2. Bootstrap documentation was already present in node_modules so finding icons offline was also very easy.

I was about to suggest css-tricks article but then I saw this github article which also makes sense.

  1. Embedding the entire “svgstore” in every view and using <use> — It just didn’t feel quite right to embed every SVG shape we have on every single page throughout GitHub.com especially if a page didn’t include a single icon.

Now I’m planning to right a script that generates the css for me using svg icons in this repo so that I can add icons to the project the old way.

<i class="bi bi-trash"></i>
3reactions
mdocommented, Dec 16, 2019

Never made a font before, so unsure what it all entails. For the time being, I’m planning stick to SVG until things are a little more stable with the icons themselves. Agreed on SVG customization options being quite limited.

Read more comments on GitHub >

github_iconTop Results From Across the Web

font-family - CSS: Cascading Style Sheets - MDN Web Docs
The font-family CSS property specifies a prioritized list of one or more font family names and/or generic family names for the selected ...
Read more >
CSS font-family property - W3Schools
The font-family property specifies the font for an element. The font-family property can hold several font names as a "fallback" system.
Read more >
css @font-family in what cases should I specify format?
1 Answer 1 · 1-Desktop format: which can be used in everything that requires locally installable fonts. · 2-Web format: which can be...
Read more >
Add a font as an XML resource - Android Developers
A font family is a set of font files along with style and weight details. In Android, you can create a new font...
Read more >
How to use @font-face in CSS
Stands for: Web Open Font Format. Created for use on the web, and developed by Mozilla in conjunction with other organizations, WOFF fonts...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found