devicons / devicons/devicon

[FEATURE REQUEST] Automatically convert svg styles to attributes

Open
#1,277 11 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
CSS
Stars
11.8k
Forks
2.4k
Avg merge
5d 4h
Merged PRs (30d)
3

Description

### I have searched through the issues and didn't find my problem.

- [X] Confirm

### Problem

Upon fixing some stuff (#1276) causing a bug in the [react-devicons](https://github.com/devicons/react-devicons) project, I noticed that the process of converting SVG styles to attributes can be automated.

Some projects using devicons, like react-devicons will fail if styles are used in the SVG icons. This has led to several bugfixes. See #1169

Here's a screenshot of the issue:
![image](https://user-images.githubusercontent.com/43886029/180101765-39b64ee8-8856-4065-8b02-78cf4b38e07c.png)

### Possible Solution

[SVGO](https://github.com/svg/svgo) has a neat script ([convertStyleToAttrs.js](https://github.com/svg/svgo/blob/main/plugins/convertStyleToAttrs.js)) to go through and convert all SVG styles into attributes. We could leverage this script to automate the process with one of our bots (maybe make a new one?).

This would be help ensure the SVG's work in the [react-devicons](https://github.com/devicons/react-devicons) project and potentially future projects with similar solutions.

### Additional information

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.