Skip to content

bug: Lack of standardizationΒ #1466

@skamradt

Description

@skamradt

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) 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 project.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions