Revert "feat: add copy-to-clipboard functionality for code elements"
This commit is contained in:
parent
333cbcad09
commit
128e904539
3 changed files with 1 additions and 213 deletions
|
|
@ -61,78 +61,3 @@
|
|||
line-height: @line-height-default;
|
||||
}
|
||||
}
|
||||
|
||||
/* Code copy functionality styles */
|
||||
.code-wrapper {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
|
||||
&.has-copy-btn {
|
||||
.code,
|
||||
pre {
|
||||
padding-right: 3rem; // Make room for copy button
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.code-copy-btn {
|
||||
position: absolute;
|
||||
top: 1.5rem;
|
||||
right: 0.5rem;
|
||||
padding: 0.25rem 0.5rem;
|
||||
background-color: @ini_background;
|
||||
border: 1px solid @ini_border;
|
||||
border-radius: @fix_border-radius;
|
||||
cursor: pointer;
|
||||
opacity: 0.7;
|
||||
transition: opacity @transition, background-color @transition;
|
||||
color: @ini_text;
|
||||
line-height: 1;
|
||||
|
||||
&:hover {
|
||||
opacity: 1;
|
||||
background-color: @ini_background_alt;
|
||||
}
|
||||
|
||||
&:active {
|
||||
transform: translateY(1px);
|
||||
}
|
||||
|
||||
svg {
|
||||
display: block;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
|
||||
&.copy-success {
|
||||
background-color: #d4edda;
|
||||
border-color: #c3e6cb;
|
||||
color: #155724;
|
||||
}
|
||||
|
||||
&.copy-error {
|
||||
background-color: #f8d7da;
|
||||
border-color: #f5c6cb;
|
||||
color: #721c24;
|
||||
}
|
||||
}
|
||||
|
||||
/* Ensure code blocks have proper positioning context */
|
||||
.code,
|
||||
pre.code,
|
||||
pre > code {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* Mobile adjustments */
|
||||
@media @screen_max-xs {
|
||||
.code-copy-btn {
|
||||
padding: 0.2rem 0.4rem;
|
||||
|
||||
svg {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue