feat: customizable code block font size (#56)

This commit is contained in:
josc146
2023-03-31 21:50:18 +08:00
parent 6d57803ea9
commit 46a0251465
6 changed files with 79 additions and 67 deletions
+10
View File
@@ -0,0 +1,10 @@
export function changeChildrenFontSize(element, size) {
try {
element.style.fontSize = size
} catch {
/* empty */
}
for (let i = 0; i < element.childNodes.length; i++) {
changeChildrenFontSize(element.childNodes[i], size)
}
}
+1
View File
@@ -1,3 +1,4 @@
export * from './change-children-font-size'
export * from './create-element-at-position'
export * from './crop-text'
export * from './ends-with-question-mark'