diff --git a/site/sass/index.scss b/site/sass/index.scss index 7c29d7a..b645212 100644 --- a/site/sass/index.scss +++ b/site/sass/index.scss @@ -218,3 +218,34 @@ abbr { display: none; } } + +.wd-codeblock { + position: relative; + text-indent: 0; + tab-size: 2; + + .copy { + display: none; + opacity: 0; + z-index: 1; + position: absolute; + top: 0; + right: 0; + transition: opacity linear 0.1s; + + &:focus { + transition: none; + opacity: 1; + } + } + + &:hover .copy, + &:focus .copy { + opacity: 1; + } + + & > pre { + padding: 8px; + overflow: auto; + } +}