diff --git a/.travis.yml b/.travis.yml index 158ce41..2ad4fa9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,6 @@ node_js: - '6' - '5' - '4' - - '0.12' script: - npm run test diff --git a/appveyor.yml b/appveyor.yml index 615f0b6..6b3e730 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -5,7 +5,6 @@ environment: - nodejs_version: 6 - nodejs_version: 5 - nodejs_version: 4 - - nodejs_version: 0.12 version: "{build}" build: off diff --git a/docs/content/features.md b/docs/content/features.md index cfe9ef2..e08effa 100644 --- a/docs/content/features.md +++ b/docs/content/features.md @@ -259,22 +259,6 @@ body { | [Plugin documentation](https://github.com/postcss/postcss-color-hex-alpha) -## `rgba` function (`rgb` fallback) - -Add solid colors fallback for rgba colors -(if your browser scope cover old browsers, eg: IE8). - -```css -body { - background: rgba(153, 221, 153, 0.8); - /* you will have the same value without alpha as a fallback */ -} -``` - -[Specification](http://www.w3.org/TR/css3-color/) -| -[Plugin documentation](https://github.com/postcss/postcss-color-rgba-fallback) - ## `rebeccapurple` color Allows you to use the new color keyword as a homage to @@ -313,21 +297,6 @@ at the support of | [Plugin documentation](https://github.com/postcss/postcss-font-variant) -## `filter` property - -The W3C filters are only transformed as svg filter using the `url(data:*)` trick -for Firefox < 35. - -```css -.blur { - filter: blur(4px); -} -``` - -[Specification](http://www.w3.org/TR/filter-effects/) -| -[Plugin documentation](https://github.com/iamvdo/pleeease-filters) - ## `initial` value Allow you to use `initial` value for any value. This value represents the value @@ -356,21 +325,6 @@ div { | [Plugin documentation](https://github.com/maximkoretskiy/postcss-initial) -## `rem` unit (`px` fallback) - -`rem` fallback to `px` -(if your browser scope cover old browsers, eg: IE8). - -```css -h1 { - font-size: 1.5rem; -} -``` - -[Specification](http://www.w3.org/TR/css3-values/#rem-unit) -| -[Plugin documentation](https://github.com/robwierzbowski/node-pixrem) - ## `:any-link` pseudo-class Allows you to use `:any-link` pseudo class. @@ -416,21 +370,6 @@ p:not(:first-child, .special) { | [Plugin documentation](https://github.com/postcss/postcss-selector-NOT) -## `::` pseudo syntax (`:` fallback) - -Adjust `::` to `:` -(if your browser scope cover old browsers, eg: IE8). - -```css -a::before { - /* ... */ -} -``` - -[Specification](http://www.w3.org/TR/css3-selectors/#pseudo-elements) -| -[Plugin documentation](https://github.com/axa-ch/postcss-pseudoelements) - ## `overflow-wrap` property (`word-wrap` fallback) Converts `overflow-wrap` to `word-wrap` (many browser support only the old [word-wrap](http://caniuse.com/#feat=wordwrap) property). diff --git a/package.json b/package.json index b9ad124..65b99d4 100644 --- a/package.json +++ b/package.json @@ -21,37 +21,32 @@ "!**/__tests__" ], "dependencies": { - "autoprefixer": "^6.0.2", - "caniuse-api": "^1.5.3", + "autoprefixer": "^7.1.0", + "caniuse-api": "^2.0.0", "chalk": "^1.1.1", - "pixrem": "^3.0.0", - "pleeease-filters": "^3.0.0", - "postcss": "^5.0.4", - "postcss-apply": "^0.3.0", - "postcss-attribute-case-insensitive": "^1.0.1", - "postcss-calc": "^5.0.0", - "postcss-color-function": "^2.0.0", - "postcss-color-gray": "^3.0.0", - "postcss-color-hex-alpha": "^2.0.0", + "postcss": "^6.0.1", + "postcss-attribute-case-insensitive": "^2.0.0", + "postcss-calc": "^6.0.0", + "postcss-color-function": "^4.0.0", + "postcss-color-gray": "^4.0.0", + "postcss-color-hex-alpha": "^3.0.0", "postcss-color-hsl": "^1.0.5", - "postcss-color-hwb": "^2.0.0", - "postcss-color-rebeccapurple": "^2.0.0", + "postcss-color-hwb": "^3.0.0", + "postcss-color-rebeccapurple": "^3.0.0", "postcss-color-rgb": "^1.1.4", - "postcss-color-rgba-fallback": "^2.0.0", - "postcss-custom-media": "^5.0.0", - "postcss-custom-properties": "^5.0.0", - "postcss-custom-selectors": "^3.0.0", - "postcss-font-family-system-ui": "^1.0.1", - "postcss-font-variant": "^2.0.0", + "postcss-custom-media": "^6.0.0", + "postcss-custom-properties": "^6.0.1", + "postcss-custom-selectors": "^4.0.1", + "postcss-font-family-system-ui": "^2.0.1", + "postcss-font-variant": "^3.0.0", "postcss-image-set-polyfill": "^0.3.3", - "postcss-initial": "^1.3.1", - "postcss-media-minmax": "^2.1.0", - "postcss-nesting": "^2.0.5", - "postcss-pseudo-class-any-link": "^1.0.0", - "postcss-pseudoelements": "^3.0.0", + "postcss-initial": "^2.0.0", + "postcss-media-minmax": "^3.0.0", + "postcss-nesting": "^3.0.0", + "postcss-pseudo-class-any-link": "^4.0.0", "postcss-replace-overflow-wrap": "^1.0.0", - "postcss-selector-matches": "^2.0.0", - "postcss-selector-not": "^2.0.0" + "postcss-selector-matches": "^3.0.1", + "postcss-selector-not": "^3.0.1" }, "peerDependencies": { "caniuse-db": "^1.0.30000652" @@ -98,8 +93,9 @@ "npmpub": "^3.1.0", "object-assign": "^3.0.0", "opn": "^1.0.2", + "postcss-apply": "^0.7.0", "postcss-browser-reporter": "^0.4.0", - "postcss-import": "^7.1.3", + "postcss-import": "^10.0.0", "postcss-loader": "^0.8.0", "postcss-reporter": "^1.3.0", "postcss-url": "^5.0.2", diff --git a/src/__tests__/fixtures/features/color-rebeccapurple.expected.css b/src/__tests__/fixtures/features/color-rebeccapurple.expected.css index 17739fc..0dab2ec 100644 --- a/src/__tests__/fixtures/features/color-rebeccapurple.expected.css +++ b/src/__tests__/fixtures/features/color-rebeccapurple.expected.css @@ -1,3 +1,3 @@ body { - background: rgb(102, 51, 153) + background: #639 } diff --git a/src/__tests__/fixtures/features/image-set.expected.css b/src/__tests__/fixtures/features/image-set.expected.css index a4d629a..98b5dcf 100644 --- a/src/__tests__/fixtures/features/image-set.expected.css +++ b/src/__tests__/fixtures/features/image-set.expected.css @@ -1,13 +1,9 @@ .image { background-image: url(img/test.png); +}@media (min-resolution: 144dpi) {.image { + background-image: url(img/test-2x.png); } -@media (min-resolution: 144dpi) { - .image { - background-image: url(img/test-2x.png); - } +}@media (min-resolution: 600dpi) {.image { + background-image: url(my-img-print.png); } -@media (min-resolution: 600dpi) { - .image { - background-image: url(my-img-print.png); - } } diff --git a/src/__tests__/fixtures/regression.expected.css b/src/__tests__/fixtures/regression.expected.css index 7bd116c..c3021dc 100644 --- a/src/__tests__/fixtures/regression.expected.css +++ b/src/__tests__/fixtures/regression.expected.css @@ -1,7 +1,3 @@ -.button { -} - -.button i { - +.button i{ color: black } diff --git a/src/__tests__/option.browsers.js b/src/__tests__/option.browsers.js index a753ff2..e77a5c0 100644 --- a/src/__tests__/option.browsers.js +++ b/src/__tests__/option.browsers.js @@ -4,16 +4,8 @@ import cssnext from ".." tape("cssnext browsers option", function(t) { - // no recent browser need pixrem - const remInput = "body{font-size:2rem}" - t.equal( - cssnext({ browsers: "last 1 version" }).process(remInput).css, - remInput, - "should not enable px fallback when all browsers support it" - ) - const customPropsInput = ":root{--foo:bar}baz{qux:var(--foo)}" - const customPropsOutput = "baz{qux: bar}" + const customPropsOutput = "baz{qux:bar}" // fx 30 doesn't handle custom prop t.equal( @@ -60,33 +52,3 @@ tape("cssnext browsers option propagation to autoprefixer", function(t) { t.end() }) - -tape("cssnext browsers option propagation to pixrem", function(t) { - const input = "body{font-size: 1rem}" - const output = "body{font-size: 16px;font-size: 1rem}" - - // IE 8 needs rem fallback - t.equal( - cssnext({ browsers: "ie 8" }).process(input).css, - output, - "should propagate browsers option to pixrem" - ) - - // IE 9 doesn't need rem fallback on a simple font-size - t.equal( - cssnext({ browsers: "ie 9" }).process(input).css, - input, - "should propagate browsers option to pixrem" - ) - - // IE 9 needs rem on pseudo element - const inputWeirdCase = input.replace("body", "body::before") - const outputWeirdCase = output.replace("body", "body::before") - t.equal( - cssnext({ browsers: "ie 9" }).process(inputWeirdCase).css, - outputWeirdCase, - "should propagate browsers option to pixrem" - ) - - t.end() -}) diff --git a/src/features.js b/src/features.js index a4caac7..879b3c4 100644 --- a/src/features.js +++ b/src/features.js @@ -60,18 +60,9 @@ export default { // https://npmjs.com/package/postcss-font-variant fontVariant: (options) => require("postcss-font-variant")(options), - // https://npmjs.com/package/pleeease-filters - filter: (options) => require("pleeease-filters")(options), - // https://npmjs.com/package/postcss-initial initial: (options) => require("postcss-initial")(options), - // https://npmjs.com/package/pixrem - rem: (options) => require("pixrem")(options), - - // https://npmjs.com/package/postcss-pseudoelements - pseudoElements: (options) => require("postcss-pseudoelements")(options), - // https://npmjs.com/package/postcss-selector-matches pseudoClassMatches: (options) => require("postcss-selector-matches")(options), @@ -81,9 +72,6 @@ export default { // https://npmjs.com/package/postcss-pseudo-class-any-link pseudoClassAnyLink: (options) => require("postcss-pseudo-class-any-link")(options), - // https://npmjs.com/package/postcss-color-rgba-fallback - colorRgba: (options) => require("postcss-color-rgba-fallback")(options), - // https://www.npmjs.com/package/postcss-replace-overflow-wrap overflowWrap: (options) => require("postcss-replace-overflow-wrap")(options),