Gzipped and Cached CDN:
package:fremycompany.minwidth/1
Original VCS Code:
https://rawgithub.com/FremyCompany/prollyfill-min-width/05925459d681d8b6c5c96e62967420e57feed3fc/polyfill-min-width.js

Element Media Queries

Element Media Queries pseudo-classes provide a mechanism to select elements based on their size.

Table of Contents

  1. :-js-min-width
  2. :-js-max-width

1. The -js-min-width pseudo-class

The min-width pseudo class :-js-min-width(width), is a funtional notation taking one arguments, the pivot size in CSS pixels of the element. It represents an element whose width is greater or equal to the numeric value provided.

Examples:

The following selector matches all div elements in an HTML document with a width larger than 100px, and colors them in red:

div:-js-min-width(100){
	background: red;
}

2. The -js-max-width pseudo-class

The max-width pseudo class :-js-max-width(width), is a funtional notation taking one arguments, the pivot size in CSS pixels of the element. It represents an element whose width is less than the numeric value provided.

Examples:

The following selector matches all div elements in an HTML document with a width lesser than 100px, and colors them in green:

div:-js-max-width(100){
	background: green;
}