Skip to content

Commit

Permalink
feat: allow sizes key to be screen width
Browse files Browse the repository at this point in the history
allow inlining custom breakpoints
  • Loading branch information
pi0 committed Feb 16, 2021
1 parent 8ee9a40 commit 6624440
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/runtime/image.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ function getSizes (ctx: ImageCTX, input: string, opts: ImageSizesOptions) {
}

for (const key in sizes) {
const screenMaxWidth = ctx.options.screens[key]
const screenMaxWidth = ctx.options.screens[key] || parseInt(key)
let size = String(sizes[key])
const isFluid = size.endsWith('vw')
if (!isFluid && /^\d+$/.test(size)) {
Expand Down

0 comments on commit 6624440

Please sign in to comment.