File tree 1 file changed +45
-33
lines changed
src/components/ui/code-highlighter
1 file changed +45
-33
lines changed Original file line number Diff line number Diff line change 6
6
7
7
background : transparent !important ;
8
8
}
9
- }
10
9
11
- .copy-tip {
12
- position : absolute;
13
- right : 2em ;
14
- top : 4em ;
15
- opacity : 0.4 ;
16
- font-size : 0.6em ;
17
- font-weight : 600 ;
18
- text-transform : uppercase;
19
- cursor : pointer;
20
- transition : opacity 0.5s ;
21
- will-change : opacity;
22
- user-select : none;
10
+ & {
11
+ & : hover .copy-tip {
12
+ opacity : 0.4 ;
13
+ visibility : visible;
14
+ }
23
15
24
- & : hover {
25
- opacity : 1 ;
26
- }
16
+ .copy-tip {
17
+ position : absolute;
18
+ right : 2em ;
19
+ top : 3em ;
20
+ opacity : 0.4 ;
21
+ font-size : 0.6em ;
22
+ font-weight : 600 ;
23
+ text-transform : uppercase;
24
+ cursor : pointer;
25
+ transition : opacity 0.5s ;
26
+ will-change : opacity;
27
+ user-select : none;
28
+ opacity : 0 ;
29
+ visibility : hidden;
30
+ transition :
31
+ opacity 0.3s ease-in-out,
32
+ visibility 0.3s ease-in-out;
27
33
28
- & ::after {
29
- content : '' ;
30
- bottom : -3px ;
31
- position : absolute;
32
- left : 3px ;
33
- right : 3px ;
34
- height : 1px ;
35
- background-color : currentColor;
36
- }
37
- }
34
+ & : hover {
35
+ opacity : 1 ;
36
+ }
37
+
38
+ & ::after {
39
+ content : '' ;
40
+ bottom : -3px ;
41
+ position : absolute;
42
+ left : 3px ;
43
+ right : 3px ;
44
+ height : 1px ;
45
+ background-color : currentColor;
46
+ }
47
+ }
38
48
39
- .language-tip {
40
- position : absolute;
41
- right : 1em ;
42
- transform : translate (-0.5em , 1.2em );
43
- font-size : 0.8em ;
44
- opacity : 0.7 ;
45
- z-index : 1 ;
49
+ .language-tip {
50
+ position : absolute;
51
+ right : 1em ;
52
+ transform : translate (-0.5em , 0.5em );
53
+ font-size : 0.8em ;
54
+ opacity : 0.7 ;
55
+ z-index : 1 ;
56
+ }
57
+ }
46
58
}
You can’t perform that action at this time.
0 commit comments