Skip to content

Commit 58d6942

Browse files
fix: uses parseFloat to handle borderWidth between 0 and 1 (#599)
Sometimes depending on the browser zoom, the borderWidth can be between 0 and 1. Because of the parseInt, in these cases, the value was hidden, even though it was greater than 0. Example, with a zoom of 150% and a borderWidth of 1px, the rendered borderWidth is 0.667px. See https://bugzilla.mozilla.org/show_bug.cgi?id=1732769
1 parent f280363 commit 58d6942

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/utilities/styles.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export const getStyles = el => {
3030

3131
const { borderColor, borderWidth, borderStyle } = borders
3232

33-
if (parseInt(borderWidth) > 0) {
33+
if (parseFloat(borderWidth) > 0) {
3434
vettedStyles.push({
3535
prop: 'borderColor',
3636
value: borderColor,

0 commit comments

Comments
 (0)