Skip to content

Commit

Permalink
Improve duotone icons in mobile safari
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasloven committed May 17, 2021
1 parent 3a2a5c6 commit e66ed00
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 36 deletions.
33 changes: 1 addition & 32 deletions custom_components/fontawesome/main.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion custom_components/fontawesome/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"codeowners": [],
"requirements": [],
"config_flow": true,
"version": "2.1.0",
"version": "2.1.1",
"iot_class": "local_polling"
}
6 changes: 3 additions & 3 deletions js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,12 @@ customElements.whenDefined("ha-svg-icon").then(() => {
:host(.color.invert) .primary {
fill: var(--icon-secondary-color, var(--disabled-text-color));
}
path:not(.primary):not(.secondary) {
opacity: 0;
}
`;
this.shadowRoot.appendChild(styleEl);
const root = this.shadowRoot.querySelector("g");
if (root.firstElementChild) {
root.firstElementChild.style.display = "none";
}
for (const k in paths) {
const el = document.createElementNS("http://www.w3.org/2000/svg", "path");
el.setAttribute("d", paths[k]);
Expand Down

0 comments on commit e66ed00

Please sign in to comment.