| 1 |
#preview { |
| 2 |
position: relative; |
| 3 |
} |
| 4 |
|
| 5 |
#preview .inner pre { |
| 6 |
border: 2px solid #ccd0d4; |
| 7 |
margin-bottom: 2em; |
| 8 |
} |
| 9 |
|
| 10 |
/** <pre> tag */ |
| 11 |
#preview pre { |
| 12 |
padding: 1em 2em 1em 2em; |
| 13 |
margin: 0; |
| 14 |
position: relative; |
| 15 |
} |
| 16 |
|
| 17 |
/** 'Copy' button and JS. */ |
| 18 |
.copy-the-code-inside-wrap .copy-the-code-button { |
| 19 |
position: absolute; |
| 20 |
right: 0; |
| 21 |
top: 0; |
| 22 |
} |
| 23 |
|
| 24 |
.copy-the-code-inside .copy-the-code-button { |
| 25 |
position: absolute; |
| 26 |
right: 0; |
| 27 |
top: 0; |
| 28 |
} |
| 29 |
.copy-the-code-wrap { |
| 30 |
display: block; |
| 31 |
position: relative; |
| 32 |
} |
| 33 |
|
| 34 |
.copy-the-code-button { |
| 35 |
background: #e1e3e8; |
| 36 |
padding: 10px 20px; |
| 37 |
cursor: pointer; |
| 38 |
box-shadow: none; |
| 39 |
color: #424242; |
| 40 |
font-size: 14px; |
| 41 |
font-weight: normal; |
| 42 |
border-radius: 0; |
| 43 |
text-transform: capitalize; |
| 44 |
border: none; |
| 45 |
outline: none; |
| 46 |
} |
| 47 |
|
| 48 |
.copy-the-code-button:hover { |
| 49 |
background: #d0d1d6; |
| 50 |
} |
| 51 |
|
| 52 |
.copy-the-code-outside + * { |
| 53 |
margin-top: 0; |
| 54 |
} |
| 55 |
|
| 56 |
.copy-the-code-outside { |
| 57 |
text-align: right; |
| 58 |
} |
| 59 |
|
| 60 |
/** Styles */ |
| 61 |
.copy-the-code-button[style="svg-icon"] { |
| 62 |
background: transparent; |
| 63 |
padding: 0; |
| 64 |
height: 25px; |
| 65 |
} |
| 66 |
.copy-the-code-button[style="svg-icon"] svg { |
| 67 |
height: auto; |
| 68 |
width: 20px; |
| 69 |
fill: #23282d; |
| 70 |
} |
| 71 |
.copy-the-code-button[style="cover"] { |
| 72 |
position: absolute; |
| 73 |
left: 0; |
| 74 |
right: 0; |
| 75 |
top: 0; |
| 76 |
bottom: 0; |
| 77 |
width: 100%; |
| 78 |
opacity: 0; |
| 79 |
background: rgba(0, 0, 0, 0.5); |
| 80 |
font-weight: bold; |
| 81 |
color: #fff; |
| 82 |
transition: all 0.3s ease-in-out; |
| 83 |
} |
| 84 |
|
| 85 |
pre:hover .copy-the-code-button[style="cover"] { |
| 86 |
opacity: 1; |
| 87 |
} |
| 88 |
|
| 89 |
.copy-the-code-inside-wrap .copy-the-code-button[style="svg-icon"] { |
| 90 |
padding: 10px; |
| 91 |
} |
| 92 |
|