Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 8ac8304

Browse files
authoredAug 24, 2023
Use "small-loading-icon" insead of "btn-octicon is-loading" (#26710)
The "btn-octicon is-loading" was introduced by #21842 , it is only used by the "Copy Content" button, but the "btn-octicon" selector would affect too many uncertain elements. Now there is a general "small-loading-icon" class, so the "btn-octicon is-loading" could be removed.
1 parent 09faf43 commit 8ac8304

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed
 

‎web_src/css/modules/animations.css

-7
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,6 @@ form.single-button-form.is-loading .button {
5757
background: transparent;
5858
}
5959

60-
/* TODO: not needed, use "is-loading small-loading-icon" instead */
61-
.btn-octicon.is-loading::after {
62-
border-width: 2px;
63-
height: 1.25rem;
64-
width: 1.25rem;
65-
}
66-
6760
/* TODO: not needed, use "is-loading small-loading-icon" instead */
6861
code.language-math.is-loading::after {
6962
padding: 0;

‎web_src/js/features/copycontent.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export function initCopyContent() {
1818
// the text to copy is not in the DOM or it is an image which should be
1919
// fetched to copy in full resolution
2020
if (link) {
21-
btn.classList.add('is-loading');
21+
btn.classList.add('is-loading', 'small-loading-icon');
2222
try {
2323
const res = await fetch(link, {credentials: 'include', redirect: 'follow'});
2424
const contentType = res.headers.get('content-type');
@@ -32,7 +32,7 @@ export function initCopyContent() {
3232
} catch {
3333
return showTemporaryTooltip(btn, i18n.copy_error);
3434
} finally {
35-
btn.classList.remove('is-loading');
35+
btn.classList.remove('is-loading', 'small-loading-icon');
3636
}
3737
} else { // text, read from DOM
3838
const lineEls = document.querySelectorAll('.file-view .lines-code');

0 commit comments

Comments
 (0)
Please sign in to comment.