diff --git a/docs/components/spinner.md b/docs/components/spinner.md index d99a050b..d1dac44b 100644 --- a/docs/components/spinner.md +++ b/docs/components/spinner.md @@ -45,7 +45,7 @@ const App = () => ( The width of the spinner's track can be changed by setting the `--track-width` custom property. ```html preview - + ``` ```jsx react diff --git a/docs/resources/changelog.md b/docs/resources/changelog.md index 5a0b66ad..63622d19 100644 --- a/docs/resources/changelog.md +++ b/docs/resources/changelog.md @@ -9,6 +9,7 @@ _During the beta period, these restrictions may be relaxed in the event of a mis ## Next - Implemented stricter linting to improve consistency and reduce errors, which resulted in many small refactors throughout the codebase [#647](https://github.com/shoelace-style/shoelace/pull/647) +- Restored the nicer animation on `` and verified it works in Safari - Updated minimum Node version to 14.17 ## 2.0.0-beta.64 diff --git a/src/components/spinner/spinner.styles.ts b/src/components/spinner/spinner.styles.ts index b89f8ffe..57a51371 100644 --- a/src/components/spinner/spinner.styles.ts +++ b/src/components/spinner/spinner.styles.ts @@ -8,7 +8,7 @@ export default css` --track-width: 2px; --track-color: rgb(128 128 128 / 25%); --indicator-color: var(--sl-color-primary-600); - --speed: 800ms; + --speed: 2s; display: inline-flex; width: 1em; @@ -47,10 +47,17 @@ export default css` @keyframes spin { 0% { transform: rotate(0deg); + stroke-dasharray: 0.01em, 2.75em; + } + + 50% { + transform: rotate(450deg); + stroke-dasharray: 1.375em, 1.375em; } 100% { - transform: rotate(360deg); + transform: rotate(1080deg); + stroke-dasharray: 0.01em, 2.75em; } } `;