New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

veams-plugin-media-query-handler

Package Overview
Dependencies
Maintainers
3
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

veams-plugin-media-query-handler

The VeamsMediaQueryHandler plugin provides to you a possibility to get the current media query name from your css.

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
decreased by-50%
Maintainers
3
Weekly downloads
 
Created
Source

VeamsMediaQueryHandler plugin

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.

Keywords

FAQs

Package last updated on 22 Sep 2017

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc