
Security News
How Enterprise Security Is Adapting to AI-Accelerated Threats
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.
veams-plugin-media-query-handler
Advanced tools
The VeamsMediaQueryHandler plugin provides to you a possibility to get the current media query name from your css.
The VeamsMediaQueryHandler plugin provides to you a possibility to get the current media query name from your css.
If you want to use the media query support then just add the following lines to a custom scss file and modify it like you want:
head {
font-family: desktop;
@include bp(1024px) {
font-family: tablet-l;
}
@include bp(768px) {
font-family: tablet-p;
}
@include bp(657px) {
font-family: mobile-l;
}
@include bp(480px) {
font-family: mobile-p;
}
@include bp(360px) {
font-family: mobile-s;
}
}
Then you only need to import and use the plugin from the Veams package:
import Veams from 'veams';
import VeamsModules from 'veams/lib/plugins/modules';
// Intialize core of Veams
Veams.initialize();
// Add plugins to the Veams system
Veams.use(VeamsMediaQueryHandler, {
delay: 200
});
Options:
You can pass a second parameter with an options object. Available options are:
mediaQueryProp {String} ['font-family'] - Define a media query property which you have added to the head element.delay {Number} [300] - Define the delay value for the throttle handling which is responsible to trigger an event and set the currentMedia value.v1.0.2
FAQs
The VeamsMediaQueryHandler plugin provides to you a possibility to get the current media query name from your css.
We found that veams-plugin-media-query-handler demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers 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
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

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.