diff options
| author | Alexander Dunkel <13646666+Sieboldianus@users.noreply.github.com> | 2019-08-18 16:27:31 +0200 |
|---|---|---|
| committer | Track3 <34504964+Track3@users.noreply.github.com> | 2019-08-18 22:27:31 +0800 |
| commit | 16c9d78ae518aebb65c3bca5871b2550bbabca16 (patch) | |
| tree | 6788f55696b07bb38ba9f3b82ebb2bfc1dfa737c /assets/scss | |
| parent | a9f2ddcfa9f9c5ba93902995162c268f860c1750 (diff) | |
| download | hermit-16c9d78ae518aebb65c3bca5871b2550bbabca16.tar.gz | |
Add code copy button to all code fields in the blog (#81)
Diffstat (limited to 'assets/scss')
| -rw-r--r-- | assets/scss/style.scss | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/assets/scss/style.scss b/assets/scss/style.scss index 4476504..51143d4 100644 --- a/assets/scss/style.scss +++ b/assets/scss/style.scss @@ -153,6 +153,37 @@ table { display: none; } +// Code copy buttons +// + +.highlight { + position: relative; +} + +.highlight pre { + padding-right: 75px; +} + +.highlight-copy-btn { + position: absolute; + bottom: 7px; + right: 7px; + border: 0; + border-radius: 4px; + padding: 1px; + font-size: 0.7em; + line-height: 1.8; + color: #fff; + background-color: #777; + opacity: 0.6; + min-width: 55px; + text-align: center; +} + +.highlight-copy-btn:hover { + background-color: #666; +} + // Accessibility // .screen-reader-text { |
