Skip to content

Commit 168e525

Browse files
committed
default offset to 0, unless we have window.devicePixelRatio that is undefined (older browser), or <= 1 (actual low-res screen)
1 parent 530d063 commit 168e525

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/style.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ import {isNone, isNoneish, isRound, maybeColorChannel, maybeNumberChannel} from
66
import {keyof, number, string} from "./options.js";
77
import {warn} from "./warnings.js";
88

9-
export const offset = (typeof window !== "undefined" ? window.devicePixelRatio > 1 : typeof it === "undefined") ? 0 : 0.5; // prettier-ignore
10-
9+
export const offset = typeof window !== "undefined" && !(window.devicePixelRatio > 1) ? 0.5 : 0;
1110
let nextClipId = 0;
1211
let nextPatternId = 0;
1312

0 commit comments

Comments
 (0)