Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use icon fonts for product icons #78889

Closed
30 tasks done
miguelsolorio opened this issue Aug 11, 2019 · 6 comments
Closed
30 tasks done

Use icon fonts for product icons #78889

miguelsolorio opened this issue Aug 11, 2019 · 6 comments
Assignees
Labels
icons-product Issues for in-product icons ux User experience issues
Milestone

Comments

@miguelsolorio
Copy link
Contributor

miguelsolorio commented Aug 11, 2019

Summary

This is to track updating our icons to use our new icon font (codicons) in the workbench. This will allow us to:

  • Style icons dynamically (themeable)
  • Allow theme authors to provide color tokens for icons
  • Unify Octicons + VS Code icons into a single icon library

This would allows to do something like below where icons inherit the foreground color of their element:

image

Notice how the icons in the selected element are different a color than the rest state

Related Issues

Out of scope

Adoption areas

  • Activity Bar
  • Sidebar
    • Explorer
    • Search
    • SCM
    • Debug
    • Extensions
    • Outline
  • Panel
    • Problems
    • Output
    • Debug Console
    • Terminal
  • Notifications
  • Find widget (editor, terminal)
  • Editor
    • Folding
    • Lighbulb
    • IntelliSense
    • Breadcrumbs
    • Breakpoints
    • Diff
    • Peek
    • Actions
  • Tabs
  • Settings
  • Keybindings
  • Dialog

Verify it works in

  • Monaco standalone editor
  • Custom views (extensions)
@miguelsolorio miguelsolorio added ux User experience issues icons-product Issues for in-product icons labels Aug 11, 2019
@miguelsolorio miguelsolorio added this to the August 2019 milestone Aug 11, 2019
@miguelsolorio miguelsolorio changed the title Explore using icon fonts for the workbench Explore using icon fonts for workbench icons Aug 11, 2019
@miguelsolorio miguelsolorio changed the title Explore using icon fonts for workbench icons Explore using icon fonts for product icons Aug 11, 2019
@miguelsolorio
Copy link
Contributor Author

Here's a demo of what's possible if we do this:

  • Reference icons via class names (removes the clutter of svg icons)
  • Dynamically style them via color tokens
  • Allow extension authors to reference them via class names
  • Reduce file sizes from ~2.5mb => 51kb

gif

@equinusocio
Copy link

equinusocio commented Aug 16, 2019

Please use a modern approach with SVG icons, not hacky fonts. With SVG you can customise everything, size, color, gradients fill, animations, fill opacity. You can even use SVG icons as mask for opacity shades (using black-to-transparent gradient, see example).

SVG technology is the today way to handle icons while fonts are an hacky approach made almost 7 years ago. Fonts are hard to maintain, require a lot of CSS code (for example a class for each icon) and they are really huge in terms of KB's.

@miguelsolorio
Copy link
Contributor Author

@equinusocio thanks for the suggestions, but we already use icon fonts with file icons and Octicons.

@equinusocio
Copy link

Yes i know, but every font icon is generated from single svg files. What i'm suggesting is to improve loading/rendering performance and maintainability by using the SVG files directly and move away from icon fonts. So you still use your file icons and octicons but as SVG. With this improvement theme authors can also provide their icons to customize the workbench :)

@patrys
Copy link

patrys commented Sep 2, 2019

There is a great post from GitHub on why dropping icon fonts is a good idea: https://github.blog/2016-02-22-delivering-octicons-with-svg/

@natis
Copy link

natis commented Sep 11, 2019

Please add the ability to have custom icons in the sidebar and status bar.

@miguelsolorio miguelsolorio changed the title Explore using icon fonts for product icons Use icon fonts for product icons Sep 26, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
icons-product Issues for in-product icons ux User experience issues
Projects
None yet
Development

No branches or pull requests

5 participants