Skip to content

Commit 4cae450

Browse files
KianNHRebeccaTamachiro
authored andcommitted
[Docs Site] Make output blocks copyable (#21090)
1 parent eff0dbd commit 4cae450

File tree

1 file changed

+7
-14
lines changed

1 file changed

+7
-14
lines changed

src/plugins/expressive-code/output-frame.js

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,26 +17,19 @@ export default () => {
1717
}
1818
context.addStyles(`
1919
div.expressive-code:has(figure.code-output) {
20-
margin-top: 0 !important;
21-
}
22-
23-
.code-output .copy {
24-
display: none !important;
20+
margin-top: 0.25rem !important;
2521
}
2622
2723
.code-output > pre {
28-
border-top-width: 0 !important;
2924
background: var(--sl-color-gray-6) !important;
30-
}
3125
32-
.code-output > pre > code {
33-
user-select: none;
34-
transition: opacity 0.5s ease;
35-
}
26+
& > code {
27+
transition: opacity 0.5s ease;
3628
37-
.code-output > pre > code:hover {
38-
cursor: default;
39-
opacity: 0.5;
29+
&:hover {
30+
opacity: 0.5;
31+
}
32+
}
4033
}
4134
`);
4235
},

0 commit comments

Comments
 (0)