Socket
Socket
Sign inDemoInstall

postcss-media-minmax

Package Overview
Dependencies
5
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.0 to 1.2.0

6

CHANGELOG.md

@@ -1,3 +0,7 @@

# 1.1.0
# 1.2.0 2015-07-06
Use PostCSS 4.1 plugin API.
# 1.1.0 2014-12-15
Add `( 300px <= width <= 900px)` or `( 900px >= width >= 300px)` syntax.

@@ -4,0 +8,0 @@

7

index.js

@@ -1,5 +0,4 @@

module.exports = mediaMinmax
var postcss = require('postcss');
function mediaMinmax() {
module.exports = postcss.plugin('postcss-media-minmax', function () {
return function(css) {

@@ -77,2 +76,2 @@ //支持 min-/max- 前缀的属性

}
}
});
{
"name": "postcss-media-minmax",
"version": "1.1.0",
"version": "1.2.0",
"description": "Using more intuitive `>=` or `<=` instead of media queries min/max prefix.",

@@ -16,3 +16,3 @@ "scripts": {

"postcss",
"postcss-plugins",
"postcss-plugin",
"media querie",

@@ -30,4 +30,6 @@ "media queries"

],
"dependencies": {
"postcss": "^4.1.14"
},
"devDependencies": {
"postcss": "^3.0.7",
"tape": "^3.0.0"

@@ -34,0 +36,0 @@ },

@@ -1,3 +0,8 @@

# PostCSS Media Minmax [![Build Status](https://travis-ci.org/postcss/postcss-media-minmax.svg)](https://travis-ci.org/postcss/postcss-media-minmax)
# PostCSS Media Minmax
[![Build Status](https://travis-ci.org/postcss/postcss-media-minmax.svg?branch=master)](https://travis-ci.org/postcss/postcss-media-minmax)
[![NPM Downloads](https://img.shields.io/npm/dm/postcss-media-minmax.svg?style=flat)](https://www.npmjs.com/package/postcss-media-minmax)
[![NPM Version](http://img.shields.io/npm/v/postcss-media-minmax.svg?style=flat)](https://www.npmjs.com/package/postcss-media-minmax)
[![License](https://img.shields.io/npm/l/postcss-media-minmax.svg?style=flat)](http://opensource.org/licenses/MIT)
> 写简单优雅的 Media Queries!

@@ -4,0 +9,0 @@

@@ -1,9 +0,13 @@

# PostCSS Media Minmax [![Build Status](https://travis-ci.org/postcss/postcss-media-minmax.svg)](https://travis-ci.org/postcss/postcss-media-minmax)
# PostCSS Media Minmax
[![Build Status](https://travis-ci.org/postcss/postcss-media-minmax.svg?branch=master)](https://travis-ci.org/postcss/postcss-media-minmax)
[![NPM Downloads](https://img.shields.io/npm/dm/postcss-media-minmax.svg?style=flat)](https://www.npmjs.com/package/postcss-media-minmax)
[![NPM Version](http://img.shields.io/npm/v/postcss-media-minmax.svg?style=flat)](https://www.npmjs.com/package/postcss-media-minmax)
[![License](https://img.shields.io/npm/l/postcss-media-minmax.svg?style=flat)](http://opensource.org/licenses/MIT)
> Writing simple and graceful Media Queries!
> Writing simple and graceful media queries!
The `min-width`,`max-width` and many other propertys of Media Queries are really confused, every time I see them, I want to cry. Right now in the new specs, you can use more intuitive <= or >= to instead of the min-/max- prefix of media queries.
The `min-width`, `max-width` and many other properties of media queries are really confusing. I want to cry every time I see them. But right now according to the new specs, you can use more intuitive `<=` or `>=` to replace the `min-`/`max-` prefixes in media queries.
This is a supporting [CSS Media Queries Level 4](http://dev.w3.org/csswg/mediaqueries/) Polyfill plugin,which let you can ues these features right now. Mom won't never worry about my study, so amazing!
This is a polyfill plugin which supports [CSS Media Queries Level 4](http://dev.w3.org/csswg/mediaqueries/) and gives you access to the new features right away. Mom will never worry about my study any more. So amazing!

@@ -80,3 +84,3 @@

PostCSS Media Minmax doesn't implement such syntax as `200px > = width` or `200px < = width` currently, because the syntax readability is not good enough.
PostCSS Media Minmax hasn't implemented syntax such as `200px > = width` or `200px < = width` currently because its readability is not good enough yet.

@@ -121,3 +125,3 @@ ## [Values](http://dev.w3.org/csswg/mediaqueries/#values)

In Example 1, the same feature name is >= and <=, which will be abbreviated as the following:
In Example 1, if a feature has both `>=` and `<=` logic, it can be written as follows:

@@ -138,3 +142,3 @@ ```css

Will get the same output results:
Which will output:

@@ -149,5 +153,5 @@ ```css

**Note**: When the Media features name in the middle, we must ensure that two `<=` or `>=` in the same direction, otherwise which will not be converted.
**Note**: When the media feature name is in the middle, we must ensure that two `<=` or `>=` are in the same direction, otherwise which will not be converted.
E.g. in the example below, width is greater than or equal to 500px and is greater than or equal to 1200px, this is the wrong in grammar and logic.
E.g. in the example below, `width` is greater than or equal to 500px and is greater than or equal to 1200px, which is the wrong in both grammar and logic.

@@ -163,5 +167,5 @@

### Media features name
### Media feature names
The following property supports the min-/max prefix in specification at present, which will be automatically converted by PostCSS Media Minmax.
The following properties support the `min-`/`max-` prefixes in the specifications at present, and will be automatically converted by PostCSS Media Minmax.

@@ -181,3 +185,3 @@ * `width`

### Support for use in `@custom-media` & Node Watch
### Using with `@custom-media` & Node Watch

@@ -284,6 +288,6 @@ ```js

* Install the relevant dependent module.
* Respect coding style(Use [EditorConfig](http://editorconfig.org/)).
* Install all the dependent modules.
* Respect the coding style (Use [EditorConfig](http://editorconfig.org/)).
* Add test cases in the [test](test) directory.
* Run test.
* Run the test cases.

@@ -299,7 +303,7 @@ ```

* Thank the author of PostCSS [Andrey Sitnik](https://github.com/ai) for giving us so simple and easy CSS syntax analysis tools.
* Thank the author of PostCSS [Andrey Sitnik](https://github.com/ai) for giving us such simple and easy CSS syntax analysis tools.
* Thank [Tab Atkins Jr.](http://xanthir.com/contact/) for writing the specs of Media Queries Level 4.
* Thank [Tab Atkins Jr.](http://xanthir.com/contact/) for writing the specs of Media Queries Level 4.
* Thank [ziyunfei](http://weibo.com/p/1005051708684567) for suggestion and help of this plugin.
* Thank [ziyunfei](http://weibo.com/p/1005051708684567) for suggestions and help of this plugin.

@@ -306,0 +310,0 @@

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc