Skip to content

Commit 1fd3189

Browse files
committed
Re-styled/sized/colored loading spinner to look better ↞ [auto-sync from https://github.com/KudoAI/chatgpt.js-chrome-starter]
1 parent 803150f commit 1fd3189

File tree

1 file changed

+20
-6
lines changed

1 file changed

+20
-6
lines changed

starters/chrome/extension/popup/style.css

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,28 @@ body, button, input, select, textarea {
1111
a { color: #999 ; text-decoration: none }
1212
a:focus, a:hover { text-decoration: underline ; color: inherit }
1313

14-
/* Loading elems */
15-
.loading-bg { background-color: white ; width: 100% ; height: 100% ; position: absolute ; z-index: 1111; }
14+
/* Loader */
15+
.loading-bg {
16+
background-color: white ; width: 100% ; height: 100% ; position: absolute ; z-index: 1111 ;
17+
display: inline-grid ; align-content: center ; justify-content: center /* center spinner */
18+
}
1619
.loading-spinner {
17-
border: 8px solid #f3f3f3 ; border-top: 8px solid #3498db ; border-radius: 50% ;
18-
width: 15vh ; height: 15vh ; animation: spin 1s linear infinite ;
19-
position: absolute ; top: calc(50% - 7.5vh - 8px) ; left: calc(50% - 7.5vh)
20+
width: 11px ; aspect-ratio: 1 ; border-radius: 50% ; border: 5px solid #000 ;
21+
animation: loader-move-head-tail 0.8s infinite linear alternate, loader-rotate 1.6s infinite linear
22+
}
23+
@keyframes loader-move-head-tail {
24+
0% { clip-path: polygon(50% 50%, 0 0, 50% 0, 50% 0, 50% 0, 50% 0, 50% 0) }
25+
12.5% { clip-path: polygon(50% 50%, 0 0, 50% 0, 100% 0, 100% 0, 100% 0, 100% 0) }
26+
25% { clip-path: polygon(50% 50%, 0 0, 50% 0, 100% 0, 100% 100%, 100% 100%, 100% 100%) }
27+
50% { clip-path: polygon(50% 50%, 0 0, 50% 0, 100% 0, 100% 100%, 50% 100%, 0 100%) }
28+
62.5% { clip-path: polygon(50% 50%, 100% 0, 100% 0%, 100% 0, 100% 100%, 50% 100%, 0 100%) }
29+
75% { clip-path: polygon(50% 50%, 100% 100%, 100% 100%, 100% 100%, 100% 100%, 50% 100%, 0 100%) }
30+
100% { clip-path: polygon(50% 50%, 50% 100%, 50% 100%, 50% 100%, 50% 100%, 50% 100%, 0 100%) }
2031
}
21-
@keyframes spin { 0% { transform: rotate(0deg) } 100% { transform: rotate(360deg) }}
32+
@keyframes loader-rotate {
33+
0% { transform: scaleY(1) rotate(0deg) } 49.99% { transform: scaleY(1) rotate(135deg) }
34+
50% { transform: scaleY(-1) rotate(0deg) } 100% { transform: scaleY(-1) rotate(-135deg) }
35+
}
2236

2337
/* Header */
2438
.menu-header {

0 commit comments

Comments
 (0)