ionic-team / ionic-team/ionicons

bug: Lack of standardization

Offen
#1,466 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
triage
Vorherrschende Sprache
TypeScript
Sterne
18.2k
Forks
2.1k
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

### 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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Bereich
design
Issue-Typ
Bug
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
30/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.