Add sketch-utils.js
This commit is contained in:
parent
a078451e11
commit
6a1182886d
1 changed files with 7 additions and 0 deletions
7
static/scripts/sketch-utils.js
Normal file
7
static/scripts/sketch-utils.js
Normal file
|
@ -0,0 +1,7 @@
|
|||
function getInlineSketchWidth() {
|
||||
return getComputedStyle(document.documentElement).getPropertyValue("--body-width");
|
||||
}
|
||||
|
||||
function convertRemToPx(rem) {
|
||||
return rem * parseFloat(getComputedStyle(document.documentElement).fontSize);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue