diff options
author | bobzel <zzzman@gmail.com> | 2025-04-11 12:53:15 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2025-04-11 12:53:15 -0400 |
commit | 1525fe600142d955fa24e939322f45cbca9d1cba (patch) | |
tree | a8f35552f017ab3056a8ca2f9564a32e6d8afe39 /src/ClientUtils.ts | |
parent | fea8bcb6264946b29775394c554d47577bb5995b (diff) |
fixed ViewGuid generation to never start with a number (enables text boxes to have css specific to a single Doc). cleaned up '%' style rules for text boxes. cleaned up custom style sheets in text boxes to only be created when needed and to improve highlighting bold text with context.
Diffstat (limited to 'src/ClientUtils.ts')
-rw-r--r-- | src/ClientUtils.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ClientUtils.ts b/src/ClientUtils.ts index e1f490c1a..03ff13924 100644 --- a/src/ClientUtils.ts +++ b/src/ClientUtils.ts @@ -476,7 +476,10 @@ export function smoothScrollHorizontal(duration: number, element: HTMLElement | export function addStyleSheet() { const style = document.createElement('style'); const sheets = document.head.appendChild(style); - return sheets.sheet; + return sheets; +} +export function removeStyleSheet(sheet?: HTMLStyleElement) { + sheet && document.head.removeChild(sheet); } export function addStyleSheetRule(sheet: CSSStyleSheet | null, selector: string, css: string | { [key: string]: string }, selectorPrefix = '.') { const propText = |