Giter Club home page Giter Club logo

vscode-codicons's Introduction

Codicons

NPM Version NPM Downloads Build Status CodeQL Status

codicons preview of the icons

This tool takes the Visual Studio Code icons and converts them into an icon font using fantasticon.

Install

You can use the npm package and install into your project via:

npm i @vscode/codicons

Note: We've deprecated vscode-codicons in favor of @vscode/codicons

If you're building a VS Code extension, see this webview extension sample on how to integrate.

Building Locally

All icons are stored under src > icons. The mappings of the class names and unicode characters are stored in src/template/mapping.json as well as the default styles under src/template/styles.hbs.

Install dependencies

After cloning this repo, install dependencies by running:

npm install

Build

npm run build

Output will be exported to a dist folder.

Update packages

You can run npm outdated to see if there are any package updates. To update packages, run:

npm update

Add icons

Export your icons (svg) to the src/icons folder and add an entry into src/template/mapping.json with a new codepoint key (this gets converted into a unicode key) and run the the build command. The build command will also remove any subfolders in the icons folder to keep the folder structure consistent.

Next, update the codicons file on the vscode repository, ensuring that the unicode characters are the same (you can reference the css file).

Using CSS Classes

If you're building a VS Code extension, see this webview extension sample on how to integrate.

When needing to reference an icon in the Visual Studio Code source code via CSS classes, simply create a dom element/container that contains codicon and the icon name like:

<div class='codicon codicon-add'></div>

It's recommended to use a single dom element for each icon and not to add children elements to it.

Using SVG Sprites

When needing to use the codicon.svg sprite file, you can reference icons using the following method:

<svg>
    <use xlink:href="codicon.svg#add" />
</svg>

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Legal Notices

Microsoft and any contributors grant you a license to the Microsoft documentation and other content in this repository under the Creative Commons Attribution 4.0 International Public License, see the LICENSE file, and grant you a license to any code in the repository under the MIT License, see the LICENSE-CODE file.

Microsoft, Windows, Microsoft Azure and/or other Microsoft products and services referenced in the documentation may be either trademarks or registered trademarks of Microsoft in the United States and/or other countries. The licenses for this project do not grant you rights to use any Microsoft names, logos, or trademarks. Microsoft's general trademark guidelines can be found at http://go.microsoft.com/fwlink/?LinkID=254653.

Privacy information can be found at https://privacy.microsoft.com/en-us/

Microsoft and any contributors reserve all other rights, whether under their respective copyrights, patents, or trademarks, whether by implication, estoppel or otherwise.

vscode-codicons's People

Contributors

aiday-mar avatar circlepulse avatar daviddossett avatar dependabot[bot] avatar drob avatar estebandalelr avatar hbons avatar italypaleale avatar lramos15 avatar microsoft-github-operations[bot] avatar microsoftopensource avatar piersdeseilligny avatar profesor08 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vscode-codicons's Issues

How should this actually be built?

I'm trying to build this with some additional icons for my vscode extension (for use in a webview). However, I can't seem to manage to build it. After running npm install, npm run build isn't working, as there isn't actually a script in package.json called "build". I tried npm run fonts instead, but it's throwing an error internal to webfonts-generator (TypeError: Cannot read property 'deps' of undefined).

How should I actually build this? My OS is Windows 10 19041.

Add "Redo" icon

Hi,
You currently have "discard" that is obviously the Undo button. However there is not a Redo icon. Could you please add one?
Thanks

Add codicon to record profiles

There's this icon

I think it should be a codicon so that we can have its style match the user's theme color (if I provide an svg icon in js-debug, it's a fixed color).

new-file compound paths

Note: This isn't technically an issue with this icon set as published. Consider this a feature request, that would be appreciated.

I am running my own build step on the svg files, and packaging it with a slightly different process. The only icon that fails to build correctly for me is the new-file icon.

It's the only icon published as two separate paths rather than single compound path like the rest of the set. Can this be fixed?

I assume you might have master file you publish out of, or would you accept a PR that fixes it?

Question regarding codicons license use in personal project

Hi ๐Ÿ‘‹

From the README.md:

Microsoft and any contributors grant you a license to the Microsoft documentation and other content in this repository under the Creative Commons Attribution 4.0 International Public License, see the LICENSE file, and grant you a license to any code in the repository under the MIT License, see the LICENSE-CODE file.

Could someone clarify what "other content in this repository" means or refers to? ๐Ÿ˜…

I want to use codicons in a personal website (some symbols) but I'm confused about the license. With "any code" also refer to the svg files under src? And if so, does it mean SVGs are licensed under MIT .. but docs under CC4? ๐Ÿค”

I guess a more direct question would be if I can use certain SVG codicons' icons in a personal website and if so, do I need to provide the copy of the LICENSE-CODE only in the code or dir where codicons are in my project (MIT) or also CC4 attribution? ๐Ÿค”

If CC4 attribution is required, is it okay to embed it in the SVG icon as a comment? (Sort of like FontAwesome does)

Github "releases" and git version tags would be nice

Love the clean looks of this icon font. Nice work!

I would love to see this repo use Github's "Releases" feature or at least some semantic versioning git tags. I know the version is in the package.json but it would be nice to be able to reference a specific release via git tag rather than searching which commit was what version.

[New Icon Request] Icons for type hierarchy

I'm developing type hierarchy feature for Java users in VS Code and find there is no type hierarchy existing in VS Code. I'm going to contribute to the reference view by References Viewlet API, the type hierarchy icons will show in the reference view as the following screenshot shows:
image

Usually, there are three views in type hierarchy, they are Type Hierarchy, SuperType Hierarchy and SubType hierarchy. SuperType Hierarchy shows the super types of the given type while the SubType hierarchy shows the sub types of the given type. Type Hierarchy shows both of them.

It could be very great and intuitional if there are meaningful view icons in the type hierarchy view.

Other IDEs' icons (in red square):

  • IntelliJ
    hierarchyIDEA

  • Eclipse
    hierarchyEclipse

Pieces of the `remote-explorer` icon appears blurry

First of all, thank you for publishing this repo. It's a real time-saver to be able to use these icons on our extensions ๐Ÿ‘

About the issue, I've noticed that some pieces of the remote-explorer icon appears blurry, compared to other icons, like folder and root-folder, which has sharper lines.

The remote-explorer icon is a monitor in the back with a remote symbol inside a small circle, in front. You may notice that the monitor is blurry, specially with zoom level 0.

I added a few screenshots, dark and light themed, with zoom level 0 and 3.

Screen Shot 2020-05-13 at 01 13 46
Screen Shot 2020-05-13 at 01 14 02
Screen Shot 2020-05-13 at 01 14 39
Screen Shot 2020-05-13 at 01 14 23

Also, the remote symbol (><) inside the small circle is hard to distinguish, but in this case, not because is blurry, but small. I'm not sure, but maybe thicker lines would give a better result.

Thank you

Icons for TestRunStates

Tests in the new API have several states:

export enum TestRunState {
	// Initial state
	Unset = 0,
	// Test is currently running
	Running = 1,
	// Test run has passed
	Passed = 2,
	// Test run has failed (on an assertion)
	Failed = 3,
	// Test run has been skipped
	Skipped = 4,
	// Test run failed for some other reason (compilation error, timeout, etc)
	Errored = 5
}

I would like icons to represent these in the sidebars ๐Ÿ™‚ Some existing icons might work, e.g.

  • Unset: no icon, or maybe some "dimmed" icon like an unset breakpoint?
  • Running: refresh
  • Passed: check
  • Failed: close
  • Skipped: same as unset? Not sure... This would be if you have something like test.only in your code.
  • Errored: issues

This is being implemented in core so I can have different colors/opacities/etc in the icons. Let me know what you think.

Request to speak with Microsoft package maintainer regarding licensing for this package

Hello,

I published package:codicon, which is a Dart wrapper around the codicon.ttf file found in this package. The LICENSE for package:codicon contains both the MIT license and the CC-BY 4.0 license (both taken from this repository) and linked from in this repository's README.

However, it appears that the information in the readme at https://marketplace.visualstudio.com/items?itemName=vscode-icons-team.vscode-icons link to a different Creative Commons license (Creative Commons - ShareAlike (CC BY-SA)). Which is correct? Is our package (package:codicon) correctly licensed under the same terms that this repository is (MIT and CC BY 4.0), or should both this repository and package:codicon be licensed under MIT and CC BY-SA?

Happy to follow up offline if that is easier - thanks for your help.

Refresh icon overlapping shape artifact

The refresh icon has overlapping paths that cause an artifact in the generated output. ๐Ÿฆ… ๐Ÿ‘€

Suggested fix: manually merge your paths into one shape.

As shown in vscode:
image

As shown individually:
image

Inverted fill/stroke on some icons in `npm i vscode-codicons`

I installed the icons via npm i vscode-codicons. Some of the icons in the TTF are inverted and look like this:

Screen Shot 2020-06-06 at 10 29 50 PM

The TTF file in this repo is correct. Previous versions of the TTF file are also correct. Would it be possible update the npm version of the TTF file to fix this issue? Thanks!

Add a filled filter icon

It would be great to be able to differentiate when a filter is active or not.

Would be nice for the Problems view and I would also like it for usages in GitLens.

Smart Select Icon

Smart Select is a feature that uses the dependency graph between cells to "magically" select them for you.
Icon we were using in spec is this magic wand type of icon.

Could we get this or something very similar for the feature to add to cell toolbar?
image

Confused as to how to use the library

Hello!

I'm working on my extension currently, using your library.
I'm mostly guided by this example, and your read me and unfortunately it doesn't seem to work.

I've tried installing the library and calling plane <div class='codicon codicon-add'> add</div>
Which doesn't seem to work for me.

I've also tried importing using the URI-s your css and font like shown in the example, this didn't work as well. Am I missing something in the documentation? Besides installing the library, what are the needed steps in order to use the icons in my webview?

Thanks a lot!

`folder-opened.svg` icon is broken when multiple are included the same page

Because the folder-opened.svg icon uses clip-path with an id reference, the icon will break if more than one are included in the page at the same time.

<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><g clip-path="url(#clip0)"><path d="M.5 14h12l.48-.37 2.63-7-.48-.63H13V3.5l-.5-.5H6.71l-.86-.85L5.5 2h-5l-.5.5v11l.5.5zM1 3h4.29l.86.85.35.15H12v2H8.5l-.35.15-.86.85H2.5l-.47.34-1 3.08L1 3zm11.13 10H1.19l1.67-5H7.5l.35-.15.86-.85h5.79l-2.37 6z"/></g><defs><clipPath id="clip0"><path d="M0 0h16v16H0V0z"/></clipPath></defs></svg>

Is there any way to remove this or stop using an id? The id attribute which shouldn't be used in a page more than once so perhaps the second icon is using the first's clip-path?

See this related issue: chakra-ui/chakra-ui#3442

VS Code Webview Useing the codicons

I am curious, is there a possiblity of exposing of codicons to the vscode extension's webview so that extension developers can use the codicons directly like they use font-awesome (after adding the dependencies)?

Add a "swap" icon

Here is the icon I am currently using to swap comparisons in GitLens:

image

include list bullet styles

With a lot of icon fonts (Font Awesome, for example) you can use

<ul>
  <li class="fa fa-icon-bell">List Item</li>
  <li class="fa fa-icon-star">List Item</li>
</ul>

and the marker for that bullet point is changed to that icon in the font.

Currently, doing <li class="codicon codicon-symbol-member">womp</li> causes the list item to break in new and exciting ways, depending on the browser that you use.

Discrepancies between repo and official product icon reference

I'm not sure if this a documentation problem, a real bug or something I misunderstand, but here we go.

When I compare the list of icons in this repository, which is apparently what is used by vscode, I would expect that it corresponds to the product icon reference, which however is not the case. Fore example I don't see any of the find-* icons mentioned in the reference.

And here's a side question, but also related: does the monaco-editor use exactly the same icons or just a subset? For example, I get no output for codicon-output, even though this icon is both, in this repo and mentioned in the icon reference.

Run by Line

Jupyter extension would like to add the run by line icon to the cell toolbar and would like to match the theme of the other vs codicons in the cell toolbar (keep it snazzy)

This is the icon currently used for run by line in our stable webview implementation.
image

Icon for left-heavy flame graph view

In https://github.com/microsoft/vscode-js-profile-visualizer/issues/11 the flame graph now supports a 'left-heavy' view, where callstacks are grouped and sorted by the cumulative time taken, rather than being displayed chronologically. I didn't find a good icon to use for it in our existing codicons.

Speedscope uses a simple arrow, but this is not self-explanitory:

Something like the generic chart icon rotated clockwise 180 degrees would work nicely https://iconmonstr.com/chart-4-svg/

Move build steps to gh actions

Need to move the build steps into a github actions so that others don't need to run these steps manually, which can be problematic when creating PRs. This action should build the files and then output them to the dist folder.

Add an "add person" icon

Something like this:

image

I would like to use it in GitLens for adding co-authors. The above is the icon I am currently using, but the plus should probably be an overlay in the bottom right like our other + icons.

Font face url should be variable using SASS

Hi,

Due to the fact the generated css has a fixed path to the relative font

@font-face {
	font-family: "codicon";
	src: url("./codicon.ttf?2d8845e471b17710e17ce49926ab9dfb") format("truetype");
}

This is forcing me to have to put the font file in the same directory as the styling, which makes no sense. If your file structure is something like:

wwwroot/
wwwroot/css
wwwroot/fonts

Then you need to put codicon.ttf in the css folder instead of fonts one.

My suggestion is to create a SASS version where the url if a variable, something like $vscode-codicons-font-path.

Thanks.

Request for a double check icon

For my ESLint execution confirmation dialog it would be great to have a double check (two check marks) in the codicon set to indicate that the user has pressed Always Allow.

[New Icon Request] Notebook Template

Looks like the general pattern for "template" icons has a dotted line rectangle behind the image.
Could we get an icon that looks like this but with a notebook in front for notebook templates?
image
image

Save As Template

For the notebook templates feature we need to be able to differentiate between save notebook and save as template.
Could we get an icon like this to indicate "Save as Template"?
image

Versions is a bit heavy

Here is out current version

image

Here is the octicons version

image

I would love to see our version much closer to the octicon version.

Add a copy icon

We currently only have a clipboard icon, but imo it isn't too friendly for copy operations

Here is the one I am currently using in GitLens:
image

An alternate version with a globe or "link" overlay would be nice as well.

image

Icons for terminal tabs

As discussed, to support microsoft/vscode#10546, microsoft/vscode#120241 I'd like to request the following icons:

  • Command Prompt: existing terminal icon with C:\ or C: in it?
  • PowerShell: slanted icon matching our style containing >_
  • Tmux: ref, note the slightly heavier bottom line
  • Debian: ref
  • Ubuntu: The "circle of friends", waiting on assets for this
  • Linux: penguin icon, this will be used as a fallback for WSL terminals

[New Icon Request] An alternative icon for debug-restart?

Currently we have icon for debug-restart like this: image

This icon looks good, but when it comes together with the refresh button, Users might feel a little bit confused:

image

Can we provide a new alternative icon for debug-restart, something like: (sorry for my weak PS skill ๐Ÿ˜„ )

image

Other IDEs has similar pattern:

  • IntelliJ image

  • Eclipse image

Add an uncolored version of our disconnect icon

While we have a good disconnect icon, because it is used for debugging it has a color, and I would like to have a normal version to use. I currently am using a copied SVG version in GitLens today.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.