Download tools/ui/src/lib/utils/css.ts from Parakon/parakon-runtime: direct link, hf CLI and curl.
- Browser
- Download file 271 Bytes
-
https://huggingface.co/Parakon/parakon-runtime/resolve/main/tools/ui/src/lib/utils/css.ts
- Command line
-
hf download hf://Parakon/parakon-runtime/tools/ui/src/lib/utils/css.ts
-
curl -L -o css.ts https://huggingface.co/Parakon/parakon-runtime/resolve/main/tools/ui/src/lib/utils/css.ts
271 Bytes
| /** | |
| * Converts a rem CSS value to pixels based on the document root font size. | |
| */ | |
| export function remToPx(rem: string): number { | |
| const val = parseFloat(rem); | |
| const fontSize = parseFloat(getComputedStyle(document.documentElement).fontSize); | |
| return val * fontSize; | |
| } | |