Run mediaqueries inside an element
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
example
lib
src
test
.babelrc
.editorconfig
.eslintrc
.gitignore
.nvmrc
LICENSE
README.md
package.json
webpack.config.js

README.md

Media Faker

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

Usage

var mf = new mediafaker({
  // The target element as a selector or dom referrence
  element: '.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