Files
fleet/website/assets/styles/components/code-block-copy-buttons.component.less
EricandCopilot Autofix powered by AI ad3ab6b613 Website: Add copy button to code blocks in articles, handbook, and osquery table documentation pages (#44778)
Closes: https://github.com/fleetdm/confidential/issues/15273

Changes:
- Added a new component `<code-block-copy-buttons>`, a component that
adds copy buttons to code blocks on pages it is added to.
- Added the new component to the handbook, articles, and osquery table
documentation pages


Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
2026-05-05 16:20:47 -05:00

43 lines
864 B
Plaintext
Vendored

/**
* <code-block-copy-buttons>
*
*/
[purpose='code-block-copy-button'] {
position: absolute;
top: 10px;
right: 10px;
border-radius: 8px;
height: 32px;
width: 32px;
background: url('/images/icon-copy-16x16@2x.png');
background-color: #F9FAFC;
background-size: 14px 14px;
background-position: center;
background-repeat: no-repeat;
cursor: pointer;
outline: none;
border: none;
&.copied {
background: url('/images/icon-copy-clicked-checkmark-no-background-32x32@2x.png');
background-size: 32px 32px;
background-repeat: no-repeat;
background-position: center;
border: none;
}
&:hover {
background-color: #E9EEF5;
}
&:focus {
outline: none;
background-color: #E9EEF5;
}
}
pre.has-copy-button {
padding-right: 42px !important;//lesshint-disable-line importantRule
position: relative;
}