-
Notifications
You must be signed in to change notification settings - Fork 0
/
[plugin] Copy Inline Code Icon.css
33 lines (29 loc) · 1.5 KB
/
[plugin] Copy Inline Code Icon.css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/* better icon for the Copy Inline Code plugin, and hide except on hover */
.copy-to-clipboard-icon {
position: absolute;
display: inline-block;
transform: translateX(-100%);
background-color: var(--icon-color-active);
color: transparent;
opacity: 0;
transition: 100ms ease;
transition-property: opacity, background-color;
-webkit-mask-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMTYiIHdpZHRoPSIxNCIgdmlld0JveD0iMCAwIDQ0OCA1MTIiPjwhLS0hRm9udCBBd2Vzb21lIEZyZWUgNi41LjEgYnkgQGZvbnRhd2Vzb21lIC0gaHR0cHM6Ly9mb250YXdlc29tZS5jb20gTGljZW5zZSAtIGh0dHBzOi8vZm9udGF3ZXNvbWUuY29tL2xpY2Vuc2UvZnJlZSBDb3B5cmlnaHQgMjAyMyBGb250aWNvbnMsIEluYy4tLT48cGF0aCBkPSJNMjA4IDBIMzMyLjFjMTIuNyAwIDI0LjkgNS4xIDMzLjkgMTQuMWw2Ny45IDY3LjljOSA5IDE0LjEgMjEuMiAxNC4xIDMzLjlWMzM2YzAgMjYuNS0yMS41IDQ4LTQ4IDQ4SDIwOGMtMjYuNSAwLTQ4LTIxLjUtNDgtNDhWNDhjMC0yNi41IDIxLjUtNDggNDgtNDh6TTQ4IDEyOGg4MHY2NEg2NFY0NDhIMjU2VjQxNmg2NHY0OGMwIDI2LjUtMjEuNSA0OC00OCA0OEg0OGMtMjYuNSAwLTQ4LTIxLjUtNDgtNDhWMTc2YzAtMjYuNSAyMS41LTQ4IDQ4LTQ4eiIvPjwvc3ZnPg==');
-webkit-mask-position: left center;
-webkit-mask-size: 75% 75%;
-webkit-mask-repeat: no-repeat;
}
.cm-inline-code:hover
~ .copy-to-clipboard-icon:not(
.cm-inline-code:hover ~ .copy-to-clipboard-icon ~ .copy-to-clipboard-icon
),
.copy-to-clipboard-icon:hover {
opacity: 0.5;
}
.copy-to-clipboard-icon:hover {
opacity: 1;
}
/* hide in notes with the "hide-copy-icon" class */
.hide-copy-icon .copy-to-clipboard-icon {
display: none;
}