Move highlighter styles out of app.css
This commit is contained in:
@@ -18,4 +18,20 @@ export class Highlighter {
|
||||
this.elem.classList.add("highlight");
|
||||
this.timer.start();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
const sheet = new CSSStyleSheet();
|
||||
sheet.replaceSync(`
|
||||
.preHighlight {
|
||||
transition: color 0.3s ease-out;
|
||||
}
|
||||
|
||||
.highlight {
|
||||
color: var(--sl-color-primary-600);
|
||||
transition: color 0.1s ease-in;
|
||||
}
|
||||
`);
|
||||
|
||||
document.adoptedStyleSheets = [...document.adoptedStyleSheets, sheet];
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user