Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

Commit

Permalink
6.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathantneal committed Oct 10, 2018
1 parent 4e3f42e commit 7f8f34b
Show file tree
Hide file tree
Showing 16 changed files with 299 additions and 6 deletions.
6 changes: 6 additions & 0 deletions .tape.js
Expand Up @@ -45,6 +45,12 @@ module.exports = {
}
}
},
'basic:autoprefixer:false': {
message: 'supports { autoprefixer: false } usage',
options: {
autoprefixer: false
}
},
'custom-properties': {
message: 'supports { browsers: "ie >= 10" } usage',
options: {
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,12 @@
# Changes to PostCSS Preset Env

### 6.1.0 (October 10, 2018)

- Added: `postcss-color-gray`
- Added: Passing `autoprefixer: false` disables autoprefixer
- Updated: `browserslist` to 4.2.0 (minor)
- Updated: `caniuse-lite` to 1.0.30000890 (patch)

### 6.0.10 (October 2, 2018)

- Updated: `postcss-custom-properties` to 8.0.8 (patch)
Expand Down
4 changes: 3 additions & 1 deletion README.md
Expand Up @@ -211,7 +211,7 @@ postcssPresetEnv({
[PostCSS Preset Env] includes [autoprefixer] and [`browsers`](#browsers) option
will be passed to it automatically.

Specifying `autoprefixer` option enables passing
Specifying the `autoprefixer` option enables passing
[additional options](https://github.com/postcss/autoprefixer#options)
into [autoprefixer].

Expand All @@ -221,6 +221,8 @@ postcssPresetEnv({
})
```

Passing `autoprefixer: false` disables autoprefixer.

### preserve

The `preserve` option determines whether all plugins should receive a
Expand Down
4 changes: 3 additions & 1 deletion index.js
Expand Up @@ -21,7 +21,9 @@ export default postcss.plugin('postcss-preset-env', opts => {
const autoprefixerOptions = Object(opts).autoprefixer;
const sharedOpts = initializeSharedOpts(Object(opts));

const stagedAutoprefixer = autoprefixer(Object.assign({ browsers }, autoprefixerOptions));
const stagedAutoprefixer = autoprefixerOptions === false
? () => {}
: autoprefixer(Object.assign({ browsers }, autoprefixerOptions));

// polyfillable features (those with an available postcss plugin)
const polyfillableFeatures = cssdb.concat(
Expand Down
1 change: 1 addition & 0 deletions lib/ids-by-execution-order.js
Expand Up @@ -17,6 +17,7 @@ export default [
'dir-pseudo-class',
'all-property', // run all-property before other property polyfills
'color-functional-notation',
'gray-function',
'hexadecimal-alpha-notation',
'lab-function',
'rebeccapurple-color',
Expand Down
2 changes: 2 additions & 0 deletions lib/plugins-by-id.js
@@ -1,5 +1,6 @@
import postcssAttributeCaseInsensitive from 'postcss-attribute-case-insensitive';
import postcssColorFunctionalNotation from 'postcss-color-functional-notation';
import postcssColorGray from 'postcss-color-gray';
import postcssColorHexAlpha from 'postcss-color-hex-alpha';
import postcssColorModFunction from 'postcss-color-mod-function';
import postcssColorRebeccapurple from 'postcss-color-rebeccapurple';
Expand Down Expand Up @@ -44,6 +45,7 @@ export default {
'focus-within-pseudo-class': postcssFocusWithin,
'font-variant-property': postcssFontVariant,
'gap-properties': postcssGapProperties,
'gray-function': postcssColorGray,
'hexadecimal-alpha-notation': postcssColorHexAlpha,
'image-set-function': postcssImageSetPolyfill,
'lab-function': postcssLabFunction,
Expand Down
9 changes: 5 additions & 4 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "postcss-preset-env",
"version": "6.0.10",
"version": "6.1.0",
"description": "Convert modern CSS into something browsers understand",
"author": "Jonathan Neal <jonathantneal@hotmail.com>",
"license": "CC0-1.0",
Expand All @@ -27,12 +27,13 @@
},
"dependencies": {
"autoprefixer": "^9.1.5",
"browserslist": "^4.1.2",
"caniuse-lite": "^1.0.30000888",
"browserslist": "^4.2.0",
"caniuse-lite": "^1.0.30000890",
"cssdb": "^3.2.1",
"postcss": "^7.0.5",
"postcss-attribute-case-insensitive": "^4.0.0",
"postcss-color-functional-notation": "^2.0.1",
"postcss-color-gray": "^5.0.0",
"postcss-color-hex-alpha": "^5.0.2",
"postcss-color-mod-function": "^3.0.3",
"postcss-color-rebeccapurple": "^4.0.1",
Expand Down Expand Up @@ -68,7 +69,7 @@
"postcss-simple-vars": "^5.0.1",
"postcss-tape": "^2.2.0",
"pre-commit": "^1.2.2",
"rollup": "^0.66.2",
"rollup": "^0.66.6",
"rollup-plugin-babel": "^4.0.3"
},
"eslintConfig": {
Expand Down
5 changes: 5 additions & 0 deletions test/basic.autoprefixer.expect.css
Expand Up @@ -71,6 +71,11 @@
order: 10;
}

.test-gray-function {
color: rgb(119,119,119);
color: rgba(119,119,119,0.5);
}

.test-rebeccapurple-color {
color: #639;
order: 11;
Expand Down
232 changes: 232 additions & 0 deletions test/basic.autoprefixer.false.expect.css
@@ -0,0 +1,232 @@
:root {
--order: 1;
}

.test-custom-properties {
order: 1;
order: var(--order);
}

.test-image-set-function {
background-image: url(img/test.png);
}

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {

.test-image-set-function {
background-image: url(img/test-2x.png);
}
}

.test-image-set-function {
background-image: image-set(url(img/test.png) 1x, url(img/test-2x.png) 2x);
order: 2;
}

[dir="ltr"] .test-logical-properties-and-values {
margin: 1px 4px 3px 2px;
}

[dir="rtl"] .test-logical-properties-and-values {
margin: 1px 2px 3px 4px;
}

.test-logical-properties-and-values {
order: 3;
padding-top: 5px;
padding-bottom: 5px;
}

.test-nesting-rules {
order: 4;

& p {
order: 5;
}

order: 6;
}

@custom-media --narrow-window (max-width: 30em);

@media (--narrow-window) {
.test-custom-media-queries {
order: 7;
}
}

@media (min-width: 480px) and (max-width: 767px) {
.test-media-query-ranges {
order: 8;
}
}

@custom-selector :--heading h1, h2, h3, h4, h5, h6;

.test-custom-selectors:--heading {
order: 9;
}

.test-case-insensitive-attributes[frame=hsides],.test-case-insensitive-attributes[frame=Hsides],.test-case-insensitive-attributes[frame=hSides],.test-case-insensitive-attributes[frame=HSides],.test-case-insensitive-attributes[frame=hsIdes],.test-case-insensitive-attributes[frame=HsIdes],.test-case-insensitive-attributes[frame=hSIdes],.test-case-insensitive-attributes[frame=HSIdes],.test-case-insensitive-attributes[frame=hsiDes],.test-case-insensitive-attributes[frame=HsiDes],.test-case-insensitive-attributes[frame=hSiDes],.test-case-insensitive-attributes[frame=HSiDes],.test-case-insensitive-attributes[frame=hsIDes],.test-case-insensitive-attributes[frame=HsIDes],.test-case-insensitive-attributes[frame=hSIDes],.test-case-insensitive-attributes[frame=HSIDes],.test-case-insensitive-attributes[frame=hsidEs],.test-case-insensitive-attributes[frame=HsidEs],.test-case-insensitive-attributes[frame=hSidEs],.test-case-insensitive-attributes[frame=HSidEs],.test-case-insensitive-attributes[frame=hsIdEs],.test-case-insensitive-attributes[frame=HsIdEs],.test-case-insensitive-attributes[frame=hSIdEs],.test-case-insensitive-attributes[frame=HSIdEs],.test-case-insensitive-attributes[frame=hsiDEs],.test-case-insensitive-attributes[frame=HsiDEs],.test-case-insensitive-attributes[frame=hSiDEs],.test-case-insensitive-attributes[frame=HSiDEs],.test-case-insensitive-attributes[frame=hsIDEs],.test-case-insensitive-attributes[frame=HsIDEs],.test-case-insensitive-attributes[frame=hSIDEs],.test-case-insensitive-attributes[frame=HSIDEs],.test-case-insensitive-attributes[frame=hsideS],.test-case-insensitive-attributes[frame=HsideS],.test-case-insensitive-attributes[frame=hSideS],.test-case-insensitive-attributes[frame=HSideS],.test-case-insensitive-attributes[frame=hsIdeS],.test-case-insensitive-attributes[frame=HsIdeS],.test-case-insensitive-attributes[frame=hSIdeS],.test-case-insensitive-attributes[frame=HSIdeS],.test-case-insensitive-attributes[frame=hsiDeS],.test-case-insensitive-attributes[frame=HsiDeS],.test-case-insensitive-attributes[frame=hSiDeS],.test-case-insensitive-attributes[frame=HSiDeS],.test-case-insensitive-attributes[frame=hsIDeS],.test-case-insensitive-attributes[frame=HsIDeS],.test-case-insensitive-attributes[frame=hSIDeS],.test-case-insensitive-attributes[frame=HSIDeS],.test-case-insensitive-attributes[frame=hsidES],.test-case-insensitive-attributes[frame=HsidES],.test-case-insensitive-attributes[frame=hSidES],.test-case-insensitive-attributes[frame=HSidES],.test-case-insensitive-attributes[frame=hsIdES],.test-case-insensitive-attributes[frame=HsIdES],.test-case-insensitive-attributes[frame=hSIdES],.test-case-insensitive-attributes[frame=HSIdES],.test-case-insensitive-attributes[frame=hsiDES],.test-case-insensitive-attributes[frame=HsiDES],.test-case-insensitive-attributes[frame=hSiDES],.test-case-insensitive-attributes[frame=HSiDES],.test-case-insensitive-attributes[frame=hsIDES],.test-case-insensitive-attributes[frame=HsIDES],.test-case-insensitive-attributes[frame=hSIDES],.test-case-insensitive-attributes[frame=HSIDES] {
order: 10;
}

.test-gray-function {
color: rgb(119,119,119);
color: rgba(119,119,119,0.5);
}

.test-rebeccapurple-color {
color: #639;
order: 11;
}

.test-hexadecimal-alpha-notation {
background-color: rgba(243,243,243,0.95294);
color: rgba(0,0,0,0.2);
order: 12;
}

.test-color-functional-notation {
color: rgb(70% 13.5% 13.5% / 50%);
order: 13;
}

.test-lab-function {
background-color: rgb(178, 34, 34);
color: rgba(178, 34, 34, 0.5);
order: 14;
}

.test-system-ui-font-family {
font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif;
order: 15;
}

.test-font-variant-property {
font-feature-settings: "c2sc";
font-variant-caps: small-caps;
order: 16;
}

.test-all-property {
animation: none 0s ease 0s 1 normal none running;
backface-visibility: visible;
background: transparent none repeat 0 0 / auto auto padding-box border-box scroll;
border: medium none currentColor;
border-collapse: separate;
border-image: none;
border-radius: 0;
border-spacing: 0;
bottom: auto;
box-shadow: none;
box-sizing: content-box;
caption-side: top;
clear: none;
clip: auto;
color: #000;
columns: auto;
column-count: auto;
column-fill: balance;
grid-column-gap: normal;
column-gap: normal;
column-rule: medium none currentColor;
column-span: 1;
column-width: auto;
content: normal;
counter-increment: none;
counter-reset: none;
cursor: auto;
direction: ltr;
display: inline;
empty-cells: show;
float: none;
font-family: serif;
font-size: medium;
font-style: normal;
font-feature-settings: normal;
font-variant: normal;
font-weight: normal;
font-stretch: normal;
line-height: normal;
height: auto;
hyphens: none;
left: auto;
letter-spacing: normal;
list-style: disc outside none;
margin: 0;
max-height: none;
max-width: none;
min-height: 0;
min-width: 0;
opacity: 1;
orphans: 2;
outline: medium none invert;
overflow: visible;
overflow-x: visible;
overflow-y: visible;
padding: 0;
page-break-after: auto;
page-break-before: auto;
page-break-inside: auto;
perspective: none;
perspective-origin: 50% 50%;
position: static;
right: auto;
tab-size: 8;
table-layout: auto;
text-align: left;
text-align-last: auto;
text-decoration: none;
text-indent: 0;
text-shadow: none;
text-transform: none;
top: auto;
transform: none;
transform-origin: 50% 50% 0;
transform-style: flat;
transition: none 0s ease 0s;
unicode-bidi: normal;
vertical-align: baseline;
visibility: visible;
white-space: normal;
widows: 2;
width: auto;
word-spacing: normal;
z-index: auto;
all: initial;
order: 17;
}

.test-matches-pseudo-class:first-child, .test-matches-pseudo-class.special {
order: 18;
}

.test-not-pseudo-class:not(:first-child):not(.special) {
order: 19;
}

.test-any-link-pseudo-class:link,.test-any-link-pseudo-class:visited {
order: 20;
}

.test-any-link-pseudo-class:any-link {
order: 20;
}

[dir="rtl"] .test-dir-pseudo-class {
order: 21;
}

.test-overflow-wrap-property {
order: 22;
word-wrap: break-word;
}

.test-focus-visible-pseudo-class.focus-visible {
order: 23;
}

.test-focus-visible-pseudo-class:focus-visible {
order: 23;
}
5 changes: 5 additions & 0 deletions test/basic.ch38.expect.css
Expand Up @@ -61,6 +61,11 @@
order: 10;
}

.test-gray-function {
color: rgb(119,119,119);
color: rgba(119,119,119,0.5);
}

.test-rebeccapurple-color {
color: rebeccapurple;
order: 11;
Expand Down
5 changes: 5 additions & 0 deletions test/basic.css
Expand Up @@ -51,6 +51,11 @@
order: 10;
}

.test-gray-function {
color: gray(50);
color: gray(50 / 50%);
}

.test-rebeccapurple-color {
color: rebeccapurple;
order: 11;
Expand Down
5 changes: 5 additions & 0 deletions test/basic.expect.css
Expand Up @@ -72,6 +72,11 @@
order: 10;
}

.test-gray-function {
color: rgb(119,119,119);
color: rgba(119,119,119,0.5);
}

.test-rebeccapurple-color {
color: #639;
order: 11;
Expand Down

0 comments on commit 7f8f34b

Please sign in to comment.