Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dist/fitty.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/fitty.module.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ exports.default = function (w) {
var style = w.getComputedStyle(f.element, null);

// get current font size in pixels (if we already calculated it, use the calculated version)
f.currentFontSize = parseInt(style.getPropertyValue('font-size'), 10);
f.currentFontSize = parseFloat(style.getPropertyValue('font-size'));

// get display type and wrap mode
f.display = style.getPropertyValue('display');
Expand Down
4 changes: 2 additions & 2 deletions src/fitty.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default ((w) => {

// we now determine which fitties should be redrawn
const fittiesToRedraw = fitties.filter(shouldRedraw);

// we calculate final styles for these fitties
fittiesToRedraw.forEach(calculateStyles);

Expand Down Expand Up @@ -102,7 +102,7 @@ export default ((w) => {
const style = w.getComputedStyle(f.element, null);

// get current font size in pixels (if we already calculated it, use the calculated version)
f.currentFontSize = parseInt(style.getPropertyValue('font-size'), 10);
f.currentFontSize = parseFloat(style.getPropertyValue('font-size'));

// get display type and wrap mode
f.display = style.getPropertyValue('display');
Expand Down