Skip to content

Commit

Permalink
#168 take only element height into account for calculating relative f…
Browse files Browse the repository at this point in the history
…ont size, see #168 (comment)
  • Loading branch information
klues committed Jan 22, 2025
1 parent 237d4bf commit 283e572
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/js/util/fontUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ fontUtil.pctToPx = function(pct, containerSize) {
width: document.documentElement.clientWidth,
height: document.documentElement.clientHeight
}
return (containerSize.width + containerSize.height) * pct / 200;
//return (containerSize.width + containerSize.height) * pct / 200;
return containerSize.height * pct / 100;
}

fontUtil.getHighContrastColor = function (hexBackground, lightColor, darkColor) {
Expand Down

0 comments on commit 283e572

Please sign in to comment.