ionic-team / ionic-team/ionicons

bug: Lack of standardization

Aperta
#1,466 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
triage
Lingua principale
TypeScript
Stelle
18.2k
Fork
2.1k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

### Current Behavior

The icon library needs some standardization. While the library renders well black on white, the use of hard coded color in an inconsistent manner makes it difficult to easily adjust multiple icons in a generic way. For example, chevron-expand-outline uses standard svg stroke attribute, while chevron-down-outline uses a style attribute. Some icons have height and width specified, some do not. logo-medium contains a comment and an unnecessary group and attributes (there may be more). the id attribute is associated to "icons" inconsistently.

### Expected Behavior

I am suggesting the following proposal for standardization:

1. Remove the height/width consistently. Usage of each SVG is going to be resized to fit a specific container for use anyway, so this is not necessary.
2. Eliminate comments and "do nothing" nodes.
3. Resize logo-x (see [bug #1425](https://github.com/ionic-team/ionicons/issues/1425)) to use the 0 0 512 512 viewbox.
4. order the header consistently: `< id="name" viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg">` NOTE: if there are global attributes that need to be inserted, insert them between viewbox and xmlns.
5. update name attribute on each icon to be the name of each icon and not "icons"
6. Convert all style blocks to standard svg attributes.
7. Move attributes up a level which are the same between multiple nodes.
8. Change `#000` and `black` to `currentColor`. This will allow easier no-muss theming.

### Steps to Reproduce

use multiple svg files from this library and attempt to recolor them to match a specific theme using a generic css style. I noted that the color is applied inconsistently. For example, attempting to recolor the icons orange:

Image

### Code Reproduction URL

_No response_

### Additional Information

I discovered this issue while evaluating the library for possible inclusion in my [SVGIconViewer](https://github.com/skamradt/SVGIconViewer) project.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Start by comparing the SVG files for chevron-expand-outline, chevron-down-outline, and logo-medium, along with the resize concern in bug #1425. Standardize the icon headers, dimensions, attributes, styles, colors, comments, groups, and ids across the library, then verify that generic CSS recoloring behaves consistently.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Ambito
design
Tipo di issue
Bug
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
30/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.