Add styling via cs.

This commit is contained in:
Spencer Ofwiti 2021-04-29 14:15:14 +03:00
parent 0009148e61
commit d0e0108274
3 changed files with 7 additions and 3 deletions

View File

@ -4,11 +4,10 @@ function copyToClipboard(text: any): boolean {
// set the innerHTML of the div
hiddenCopy.innerHTML = text;
// set the position to be absolute and off the screen
hiddenCopy.style.position = 'absolute';
hiddenCopy.style.left = '-9999px';
hiddenCopy.classList.add('clipboard');
// check and see if the user had a text selection range
let currentRange;
let currentRange: Range | boolean;
if (document.getSelection().rangeCount > 0) {
// the user has a text selection range, store it
currentRange = document.getSelection().getRangeAt(0);

View File

@ -54,6 +54,11 @@ table { width: 100%; }
li.breadcrumb-item.active,
footer.footer { color: black; }
.clipboard {
position: absolute;
left: -9999px;
}
#sidebar {
position: sticky;
position: -webkit-sticky;