Skip to content

Bug in min-width and max-width matching with em values #17

@kimmobrunfeldt

Description

@kimmobrunfeldt

We noticed a strange behavior when trying to do matches. Issue demostrated below:

> const css = require('css-mediaquery')
undefined
> css.match('screen and (min-width: 48em)', { width: '48em' })
false
> css.match('screen and (max-width: 48em)', { width: '48em' })
false

I think these both should return true. That's how Chrome matchMedia()works when tested.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions