Skip to content

Commit

Permalink
fix: Correct color for spinner background (#212)
Browse files Browse the repository at this point in the history
  • Loading branch information
magnuh authored Mar 27, 2024
1 parent 56e3c68 commit 5720630
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/_rules/animations.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const inProgress = 'background-image:linear-gradient(135deg,rgba(0,0,0,.05) 25%,
const keyFrames = '@keyframes animate-inprogress {0% {background-position: 0 0;}to {background-position: 60px 0;}}';

/*----SPINNER----*/
const spinner = '--spinner-size: 24px;height: var(--spinner-size);width: var(--spinner-size);border-radius: 50%;border: calc(var(--spinner-size) / 8) solid rgba(var(--w-s-rgb-border-primary),.5);border-top-color: var(--w-s-color-border-primary);position: relative;animation: animate-spinner 0.75s infinite linear;';
const spinner = '--spinner-size: 24px;height: var(--spinner-size);width: var(--spinner-size);border-radius: 50%;border: calc(var(--spinner-size) / 8) solid rgba(var(--w-s-rgb-border-primary-subtle),.5);border-top-color: var(--w-s-color-border-primary);position: relative;animation: animate-spinner 0.75s infinite linear;';
const spinnerPseudo = `content: ' ';height: calc(var(--spinner-size) / 8);width: calc(var(--spinner-size) / 8);border-radius: 50%;position: absolute;top: calc(var(--spinner-size) / 180);`;
const spinnerBefore = 'left:0;';
const spinnerAfter = 'right:0;';
Expand Down
2 changes: 1 addition & 1 deletion test/animations.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ test('animate spinner', async ({ uno }) => {
const { css } = await uno.generate(classes);
expect(css).toMatchInlineSnapshot(`
"/* layer: default */
.animate-spinner{--spinner-size: 24px;height: var(--spinner-size);width: var(--spinner-size);border-radius: 50%;border: calc(var(--spinner-size) / 8) solid rgba(var(--w-s-rgb-border-primary),.5);border-top-color: var(--w-s-color-border-primary);position: relative;animation: animate-spinner 0.75s infinite linear;}.animate-spinner::before,.animate-spinner::after{content: ' ';height: calc(var(--spinner-size) / 8);width: calc(var(--spinner-size) / 8);border-radius: 50%;position: absolute;top: calc(var(--spinner-size) / 180);}.animate-spinner::after{right:0;}.animate-spinner::before{left:0;}@keyframes animate-spinner {to{transform:rotate(359deg);}}"
.animate-spinner{--spinner-size: 24px;height: var(--spinner-size);width: var(--spinner-size);border-radius: 50%;border: calc(var(--spinner-size) / 8) solid rgba(var(--w-s-rgb-border-primary-subtle),.5);border-top-color: var(--w-s-color-border-primary);position: relative;animation: animate-spinner 0.75s infinite linear;}.animate-spinner::before,.animate-spinner::after{content: ' ';height: calc(var(--spinner-size) / 8);width: calc(var(--spinner-size) / 8);border-radius: 50%;position: absolute;top: calc(var(--spinner-size) / 180);}.animate-spinner::after{right:0;}.animate-spinner::before{left:0;}@keyframes animate-spinner {to{transform:rotate(359deg);}}"
`);
});

0 comments on commit 5720630

Please sign in to comment.