Giter VIP home page Giter VIP logo

mqa.js's Introduction

mqa.js (meqa.js)

Build Status

A small (540 byte-ish, gzipped+minified!), modern library for managing media queries programmatically (i.e. in JavaScript). Most media query libraries I've seen forces the developer to duplicate their media query syntaxes (from CSS file to JavaScript file). See the documentation for more information and how to use the API.

Browser support

Every browser that supports window.matchMedia() and Array Extras should be fine. Currently tested on:

  • Firefox 19
  • Safari 6
  • Chrome 24
  • IE9 (with polyfills, see this and this*)
  • IE10
  • iOS6 (Safari & Chrome)

Develop

mqa.js uses grunt 0.4.

$ npm install -g grunt-cli
$ cd path/to/mqa.js
$ npm install
// running separate tasks:
$ grunt jshint
$ grunt test
// above two are equal to running just:
$ grunt

Contributing

There's no real style-guide followed, but please follow the existing code's style. And remember to always run grunt before sending a pull request to make sure the unit tests and JSHint rules are passing.

When new features are being developed, unit tests and JSDoc documentation should be added as well. See existing tests and documentation for inspiration.

License

Dual license, MIT/GPL. Use whatever fits your project.

* = When using this polyfill, an initial event is triggered when a media query is matched when loading the document. This is not the case with native implementations and other polyfills I've tried.

mqa.js's People

Contributors

peol avatar tracend avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.