
Security News
The Changelog Podcast: Practical Steps to Stay Safe on npm
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.
@advertol/context-media-query
Advanced tools
Control zone visibility with CSS media query listeners.
npm install @advertol/context-media-query --save
import advertol from '@advertol/core';
import MediaQueryContext from '@advertol/context-media-query';
const instance = advertol({
// …
context: [
new MediaQueryContext({
'screen and (min-width:1000px) and (max-width:1199px)': [ 'becky', 'lucy', 'maggie' ],
'screen and (min-width:1500px)': [ 'becky', 'lucy', 'maggie', 'madison', 'ziggy', 'ruby' ],
'screen and (min-width:915px) and (max-width:999px)': [ 'becky', 'lucy', 'maggie', 'maggie' ],
'screen and (min-width:1200px) and (max-width:1499px)': [ 'becky', 'lucy', 'maggie', 'madison', 'ziggy' ],
'screen and (min-width:728px) and (max-width:914px)': [ 'becky', 'maggie' ],
'screen and (max-width:599px)': ['bruno']
})
]
});
instance.resolve();
Type: Object
List of media query contexts and zones for context.
Each object property has:
Tested in IE9+ and all modern browsers, assuimg window.matchMedia and window.matchMedia listeners support is available.
For automated tests, run npm run test:automated (append :watch for watcher support).
MIT © Ivan Nikolić
[1.0.0][] - 2019-04-01
FAQs
Control zone visibility with CSS media query listeners.
We found that @advertol/context-media-query demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.