Files
webawesome/docs/assets/styles/copy-code.css

46 lines
855 B
CSS
Raw Normal View History

wa-copy-button.copy-button {
--background-color: var(--wa-color-gray-20);
--background-color-hover: color-mix(in oklab, var(--background-color), white 5%);
2024-04-17 11:20:27 -04:00
position: absolute;
top: 0.25rem;
right: 0.25rem;
font-family: var(--wa-font-family-body);
color: var(--wa-color-gray-80);
2025-01-02 15:37:09 -05:00
border-radius: var(--wa-border-radius-m);
2024-04-17 11:20:27 -04:00
padding: 0.25rem;
&:hover {
color: white;
2024-04-17 11:20:27 -04:00
}
&:focus-visible {
outline: var(--wa-focus-ring);
}
}
@media (hover: hover) {
.copy-button:not(:focus-within) {
opacity: 0;
}
pre:hover > .copy-button {
opacity: 1;
}
}
.block-link-icon {
position: absolute;
inset-block-start: 0;
inset-inline-end: calc(100% + var(--wa-space-s));
transition: var(--wa-transition-slow);
&:not(:hover, :focus) {
opacity: 50%;
}
:not(:hover, :focus-within) > & {
opacity: 0;
}
}