Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Commit 581500e

Browse files
author
Marcel Gerber
committed
Use rotateplane cursor as spinner
1 parent bcab0a2 commit 581500e

5 files changed

Lines changed: 49 additions & 33 deletions

File tree

src/styles/brackets.less

Lines changed: 49 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -158,12 +158,13 @@ a, img {
158158
white-space: nowrap;
159159

160160
> div {
161-
border-left: 1px solid rgba(0, 0, 0, 0.1);
161+
&:not(.spinner) {
162+
border-left: 1px solid rgba(0, 0, 0, 0.1);
163+
}
162164
float: right;
163165
padding: 0 10px;
164166
}
165167
.spinner { // spinner is tiny & usually invisible; reduce margin so gap is less glaring
166-
border: none;
167168
margin: 6px 10px;
168169
padding: 0;
169170
}
@@ -173,15 +174,6 @@ a, img {
173174
}
174175
}
175176

176-
@-webkit-keyframes spinner-sprites-12 {
177-
0% { background-position: 0px 0px; }
178-
100% { background-position: -120px 0px; }
179-
}
180-
@-webkit-keyframes spinner-sprites-36 {
181-
0% { background-position: 0px 0px; }
182-
100% { background-position: -360px 0px; }
183-
}
184-
185177
#status-indent > * {
186178
display: inline-block;
187179
}
@@ -1369,42 +1361,66 @@ textarea.exclusions-editor {
13691361

13701362
.spinner {
13711363
display: inline-block;
1372-
vertical-align: middle;
1373-
margin-top: -2px;
1374-
width: 12px;
1375-
height: 12px;
1376-
background: url("images/spinner_small_sprites12.png") no-repeat;
1364+
box-sizing: border-box;
1365+
width: 14px;
1366+
height: 14px;
1367+
border-left: 3px solid #78B2F2;
1368+
border-right: 3px solid #78B2F2;
1369+
overflow: hidden;
1370+
position: relative;
13771371
visibility: hidden;
13781372

1373+
&:before,
1374+
&:after {
1375+
border-left: 3px solid #78B2F2;
1376+
border-right: 3px solid #78B2F2;
1377+
box-sizing: border-box;
1378+
content: "";
1379+
display: block;
1380+
position: absolute;
1381+
width: 100%;
1382+
height: 3px;
1383+
left: 0;
1384+
}
1385+
&:before {
1386+
top: 0;
1387+
}
1388+
&:after {
1389+
bottom: 0;
1390+
}
1391+
13791392
&.spin {
1380-
-webkit-animation: spinner-sprites-12 1.2s steps(10) infinite;
1393+
-webkit-animation: spinner-rotateplane 1.2s infinite ease-in-out;
1394+
animation: spinner-rotateplane 1.2s infinite ease-in-out;
13811395
visibility: visible;
13821396
}
13831397

13841398
&.large {
13851399
width: 36px;
13861400
height: 36px;
1387-
margin-top: 0;
1388-
background: url("images/spinner_large_sprites36.png") no-repeat;
1389-
1390-
&.spin {
1391-
-webkit-animation: spinner-sprites-36 1.2s steps(10) infinite;
1401+
border-left: 9px solid #78B2F2;
1402+
border-right: 9px solid #78B2F2;
1403+
1404+
&:before,
1405+
&:after {
1406+
border-left: 7px solid #78B2F2;
1407+
border-right: 7px solid #78B2F2;
1408+
height: 9px;
13921409
}
13931410
}
13941411
}
1395-
// Retina versions
1396-
@media only screen and (-webkit-min-device-pixel-ratio: 2),
1397-
only screen and (min-device-pixel-ratio: 2) {
1398-
.spinner {
1399-
background-image: url("images/spinner_small_sprites12@2x.png");
1400-
background-size: 120px 12px;
14011412

1402-
&.large {
1403-
background: url("images/spinner_large_sprites36@2x.png") no-repeat;
1404-
background-size: 360px 36px;
1405-
}
1406-
}
1413+
@-webkit-keyframes spinner-rotateplane {
1414+
0% { -webkit-transform: perspective(120px) }
1415+
50% { -webkit-transform: perspective(120px) rotateY(180deg) }
1416+
100% { -webkit-transform: perspective(120px) rotateY(180deg) rotateX(180deg) }
14071417
}
1418+
@keyframes spinner-rotateplane {
1419+
0% { -webkit-transform: perspective(120px) rotateX(0deg) rotateY(0deg); transform: perspective(120px) rotateX(0deg) rotateY(0deg); }
1420+
50% { -webkit-transform: perspective(120px) rotateX(-180.1deg) rotateY(0deg); transform: perspective(120px) rotateX(-180.1deg) rotateY(0deg); }
1421+
100% { -webkit-transform: perspective(120px) rotateX(-180deg) rotateY(-179.9deg); transform: perspective(120px) rotateX(-180deg) rotateY(-179.9deg); }
1422+
}
1423+
14081424

14091425

14101426
/* Problems panel & CodeInspection status bar indicator */
-19.2 KB
Binary file not shown.
-56.7 KB
Binary file not shown.
-4.37 KB
Binary file not shown.
-10.8 KB
Binary file not shown.

0 commit comments

Comments
 (0)