We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eed55cb commit ca7aca3Copy full SHA for ca7aca3
frontend/src/ts/test/break-ligatures.ts
@@ -1,5 +1,5 @@
1
import Config from "../config";
2
-import { ElementWithUtils, qsr } from "../utils/dom";
+import { ElementWithUtils } from "../utils/dom";
3
4
export function set(
5
wordEl: ElementWithUtils,
@@ -11,8 +11,10 @@ export function set(
11
return;
12
}
13
14
- const wordsEl = qsr("#words");
15
- if (Config.typedEffect === "dots" && wordsEl.hasClass("withLigatures")) {
+ if (Config.typedEffect !== "dots") return;
+
16
+ const parent = wordEl.native.parentElement;
17
+ if (parent?.classList.contains("withLigatures")) {
18
const width = wordEl.native.getBoundingClientRect().width;
19
wordEl.setStyle({ width: `${width}px` });
20
wordEl.addClass("broken-ligatures");
0 commit comments