mirror of
https://github.com/zyllian/webdog.git
synced 2025-01-18 03:32:21 -08:00
improve default code block styling
This commit is contained in:
parent
566c713097
commit
a485482fa7
2 changed files with 42 additions and 0 deletions
|
@ -171,12 +171,26 @@ abbr {
|
|||
position: relative;
|
||||
|
||||
.copy {
|
||||
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: scroll;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,3 +2,31 @@
|
|||
background-color: #bbb;
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
.wd-codeblock {
|
||||
position: relative;
|
||||
|
||||
.copy {
|
||||
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: scroll;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue