Skip to content

Commit 7cdd28a

Browse files
committed
feat: Enable and style the code block copy-to-clipboard feature.
1 parent 956f1c2 commit 7cdd28a

2 files changed

Lines changed: 16 additions & 5 deletions

File tree

docs/assets/stylesheets/theme.css

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,3 +179,14 @@
179179
display: none; /* Hide light images in dark mode */
180180
}
181181

182+
.md-clipboard {
183+
opacity: 1 !important;
184+
}
185+
186+
.md-clipboard:hover {
187+
background-color: var(--md-accent-fg-color--transparent);
188+
}
189+
190+
[data-md-color-scheme="slate"] .md-clipboard:not(:hover) {
191+
color: var(--md-default-fg-color--light);
192+
}

mkdocs.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,11 @@ theme:
7272
icon: material/brightness-4
7373
name: Switch to light mode
7474

75-
features:
76-
- navigation.instant
77-
- navigation.sections
78-
- navigation.expand
79-
- toc.integrate
75+
features:
76+
- navigation.instant
77+
- navigation.sections
78+
- navigation.expand
79+
- content.code.copy
8080

8181
markdown_extensions:
8282
- footnotes

0 commit comments

Comments
 (0)