Home

tailwind-ctp-intellisense @615fd7f630e7ecb6ed1be3756182f70ea0fb8d48 - refs - log -
-
https://git.jolheiser.com/tailwind-ctp-intellisense.git
Tailwind intellisense + Catppuccin
tailwind-ctp-intellisense / packages / tailwindcss-language-service / src / util / remToPx.ts
- raw
1
2
3
4
5
6
7
8
export function remToPx(
  value: string,
  rootSize: number = 16
): string | undefined {
  return /^-?[0-9.]+rem$/.test(value)
    ? `${parseFloat(value.substr(0, value.length - 3)) * rootSize}px`
    : undefined
}