From f5d143710e5df2e909d708ecc4bbde30ba2d54d5 Mon Sep 17 00:00:00 2001 From: Cory LaViska Date: Mon, 20 Sep 2021 10:41:10 -0400 Subject: [PATCH] fixes #528 --- docs/components/icon.md | 18 +++++++++--------- docs/resources/changelog.md | 1 + 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/docs/components/icon.md b/docs/components/icon.md index 765d40969..cdd65f867 100644 --- a/docs/components/icon.md +++ b/docs/components/icon.md @@ -385,7 +385,7 @@ Icons in this library are licensed under the [Apache 2.0 License](https://github ### Remix Icon -This will register the [Remix Icon](https://remixicon.com/) library using the jsDelivr CDN. This library has two variations: line (default) and fill (`*-fill`). It also groups icons by categories, so the name must include the category and icon separated by a slash. A mutator function is required to set the SVG's `fill` to `currentColor`. +This will register the [Remix Icon](https://remixicon.com/) library using the jsDelivr CDN. This library groups icons by categories, so the name must include the category and icon separated by a slash, as well as the `-line` or `-fill` suffix as needed. A mutator function is required to set the SVG's `fill` to `currentColor`. Icons in this library are licensed under the [Apache 2.0 License](https://github.com/Remix-Design/RemixIcon/blob/master/License). @@ -395,21 +395,21 @@ Icons in this library are licensed under the [Apache 2.0 License](https://github registerIconLibrary('remixicon', { resolver: name => { - const match = name.match(/^(.*?)\/(.*?)(-(fill))?$/); + const match = name.match(/^(.*?)\/(.*?)?$/); match[1] = match[1].charAt(0).toUpperCase() + match[1].slice(1); - return `https://cdn.jsdelivr.net/npm/remixicon@2.5.0/icons/${match[1]}/${match[2]}${match[3] || '-line'}.svg`; + return `https://cdn.jsdelivr.net/npm/remixicon@2.5.0/icons/${match[1]}/${match[2]}.svg`; }, mutator: svg => svg.setAttribute('fill', 'currentColor') });
- - - - - - + + + + + +
diff --git a/docs/resources/changelog.md b/docs/resources/changelog.md index 37057ba8e..6b8361f5e 100644 --- a/docs/resources/changelog.md +++ b/docs/resources/changelog.md @@ -13,6 +13,7 @@ _During the beta period, these restrictions may be relaxed in the event of a mis - Added the `--speed` custom property to `` - Added the `--size` and `--track-width` custom properties to `` - Fixed a bug where `` wasn't using a border radius token [#523](https://github.com/shoelace-style/shoelace/issues/523) +- Fixed a bug in the Remix Icons example where some icons would 404 [#528](https://github.com/shoelace-style/shoelace/issues/528) - Updated `` to use only CSS for styling - Updated `` to use an SVG and improved the indicator animation