Skip to content

Commit 4904119

Browse files
committed
Fix Copy to Clipboard Button
1 parent ae82481 commit 4904119

File tree

1 file changed

+62
-0
lines changed

1 file changed

+62
-0
lines changed

_sass/custom/custom.scss

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,68 @@
4848
box-shadow: 0 18px 36px rgba(15, 23, 42, 0.18);
4949
}
5050

51+
.main-content div.highlighter-rouge,
52+
.main-content figure.highlight,
53+
.main-content div.listingblock > div.content {
54+
position: relative;
55+
}
56+
57+
.main-content div.highlighter-rouge > button,
58+
.main-content figure.highlight > button,
59+
.main-content div.listingblock > div.content > button {
60+
position: absolute;
61+
top: 0.85rem;
62+
right: 0.85rem;
63+
z-index: 2;
64+
display: inline-flex;
65+
align-items: center;
66+
justify-content: center;
67+
min-width: 2.5rem;
68+
height: 2.5rem;
69+
padding: 0;
70+
border: none;
71+
border-radius: 0.7rem;
72+
background: transparent;
73+
color: #e6edf7;
74+
opacity: 0.92;
75+
box-shadow: 0 10px 24px rgba(15, 23, 42, 0.28);
76+
transition:
77+
opacity 120ms ease,
78+
transform 120ms ease,
79+
background-color 120ms ease,
80+
border-color 120ms ease,
81+
box-shadow 120ms ease;
82+
cursor: pointer;
83+
}
84+
85+
.main-content div.highlighter-rouge > button:hover,
86+
.main-content div.highlighter-rouge > button:focus,
87+
.main-content figure.highlight > button:hover,
88+
.main-content figure.highlight > button:focus,
89+
.main-content div.listingblock > div.content > button:hover,
90+
.main-content div.listingblock > div.content > button:focus {
91+
opacity: 1;
92+
transform: translateY(-1px);
93+
background: transparent;
94+
box-shadow: 0 14px 28px rgba(15, 23, 42, 0.34);
95+
cursor: pointer;
96+
}
97+
98+
.main-content div.highlighter-rouge > button:focus,
99+
.main-content figure.highlight > button:focus,
100+
.main-content div.listingblock > div.content > button:focus {
101+
outline: 2px solid rgba(125, 211, 252, 0.9);
102+
outline-offset: 2px;
103+
}
104+
105+
.main-content div.highlighter-rouge > button svg,
106+
.main-content figure.highlight > button svg,
107+
.main-content div.listingblock > div.content > button svg {
108+
width: 1.1rem;
109+
height: 1.1rem;
110+
fill: currentColor;
111+
}
112+
51113
.main-content .diagnostic-image {
52114
display: block;
53115
width: 100%;

0 commit comments

Comments
 (0)