Add styling via cs.
This commit is contained in:
parent
0009148e61
commit
d0e0108274
@ -4,11 +4,10 @@ function copyToClipboard(text: any): boolean {
|
|||||||
// set the innerHTML of the div
|
// set the innerHTML of the div
|
||||||
hiddenCopy.innerHTML = text;
|
hiddenCopy.innerHTML = text;
|
||||||
// set the position to be absolute and off the screen
|
// set the position to be absolute and off the screen
|
||||||
hiddenCopy.style.position = 'absolute';
|
hiddenCopy.classList.add('clipboard');
|
||||||
hiddenCopy.style.left = '-9999px';
|
|
||||||
|
|
||||||
// check and see if the user had a text selection range
|
// check and see if the user had a text selection range
|
||||||
let currentRange;
|
let currentRange: Range | boolean;
|
||||||
if (document.getSelection().rangeCount > 0) {
|
if (document.getSelection().rangeCount > 0) {
|
||||||
// the user has a text selection range, store it
|
// the user has a text selection range, store it
|
||||||
currentRange = document.getSelection().getRangeAt(0);
|
currentRange = document.getSelection().getRangeAt(0);
|
||||||
|
@ -54,6 +54,11 @@ table { width: 100%; }
|
|||||||
li.breadcrumb-item.active,
|
li.breadcrumb-item.active,
|
||||||
footer.footer { color: black; }
|
footer.footer { color: black; }
|
||||||
|
|
||||||
|
.clipboard {
|
||||||
|
position: absolute;
|
||||||
|
left: -9999px;
|
||||||
|
}
|
||||||
|
|
||||||
#sidebar {
|
#sidebar {
|
||||||
position: sticky;
|
position: sticky;
|
||||||
position: -webkit-sticky;
|
position: -webkit-sticky;
|
||||||
|
Loading…
Reference in New Issue
Block a user