Skip to content

Repository files navigation

Media Faker

Treat an element as if its the viewport for css. Making media queries work without an iframe.

Usage

varmf=newmediafaker({// The target element as a selector or dom referrenceelement: '.stage',});

Note

Currently Media Faker removes all media queries in any active stylesheet, soon this will be configurable.

Use Cases

This is a pretty obscure library so Why use this? MediaFaker was created for use in documentation for a component library. Allowing users to see how the component works at different viewport sizes without having to resize their browser.

Examples

See the examples folder for examples

Bootstrap

Running bootstrap media queries inside a resizable div without using an Iframe

example

License

MIT

About

Run mediaqueries inside an element

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages