Skip to content

Commit

Permalink
Merge pull request #2865 from chntllh/Battery-animations
Browse files Browse the repository at this point in the history
Using steps() in animation to reduce cpu usage.
  • Loading branch information
Alexays authored Jan 25, 2024
2 parents 0948a40 + 7e76369 commit 7caf0b9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion resources/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,13 @@ button:hover {
}
}

/* Using steps() instead of linear as a timing function to limit cpu usage */
#battery.critical:not(.charging) {
background-color: #f53c3c;
color: #ffffff;
animation-name: blink;
animation-duration: 0.5s;
animation-timing-function: linear;
animation-timing-function: steps(12);
animation-iteration-count: infinite;
animation-direction: alternate;
}
Expand Down

0 comments on commit 7caf0b9

Please sign in to comment.