Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolasalan committed Feb 11, 2024
1 parent de4a8e5 commit 684d10e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/src/lib/remToPx.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export function remToPx(remValue) {
let rootFontSize =
typeof window === 'undefined'
? 16
: parseFloat(window.getComputedStyle(document.documentElement).fontSize)

return parseFloat(remValue) * rootFontSize
}

0 comments on commit 684d10e

Please sign in to comment.