Skip to content
This repository was archived by the owner on Dec 19, 2024. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: MoOx/postcss-cssnext
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 4717a5963144c7292e3dc5d73c3c7dfe58ba0be4
Choose a base ref
...
head repository: MoOx/postcss-cssnext
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 03b6017ec126231dc6fd90fd9297dd067edad948
Choose a head ref

Commits on Oct 4, 2016

  1. Copy the full SHA
    02f4b5a View commit details

Commits on Nov 10, 2016

  1. Docs: fix cssnano usage example (#323) (#328)

    Closes #323
    Purii authored and MoOx committed Nov 10, 2016
    Copy the full SHA
    e4be3a0 View commit details
  2. Docs: add carbonads

    MoOx committed Nov 10, 2016
    Copy the full SHA
    d2095d2 View commit details

Commits on Nov 28, 2016

  1. Added: new rgb() & hsl() functional notation (via postcss-color-rgb &…

    … postcss-color-hsl) (#330)
    
    * Added: postcss-color-rgb & postcss-color-hsl for transpiling functional notation
    
    * Fix: CI error: Cannot find module postcss-value-parse
    
    Closes #300
    dmarchena authored and MoOx committed Nov 28, 2016
    Copy the full SHA
    e2ae3b3 View commit details
  2. Docs: fix usage examples

    MoOx committed Nov 28, 2016
    Copy the full SHA
    9d771b8 View commit details
  3. 2.9.0

    MoOx committed Nov 28, 2016
    Copy the full SHA
    8c72990 View commit details

Commits on Feb 3, 2017

  1. Copy the full SHA
    cf304ac View commit details
  2. Copy the full SHA
    bc70661 View commit details
  3. Copy the full SHA
    711bcab View commit details
  4. Copy the full SHA
    af96203 View commit details
  5. Copy the full SHA
    cf5a472 View commit details

Commits on Mar 16, 2017

  1. Merge pull request #342 from JLHwung/add-postcss-font-family-system-ui

    Add postcss-font-family-system-ui
    MoOx authored Mar 16, 2017
    Copy the full SHA
    fe6d852 View commit details
  2. Copy the full SHA
    951b81d View commit details
  3. 2.10.0

    MoOx committed Mar 16, 2017
    Copy the full SHA
    6577f6c View commit details

Commits on Apr 13, 2017

  1. Update features-activation-map

    I have added info about colorRebeccapurple in caniuse (v 1.0.30000652).
    
    https://caniuse.com/#feat=css-rebeccapurple
    Semigradsky authored Apr 13, 2017
    Copy the full SHA
    d3b21c1 View commit details

Commits on Apr 20, 2017

  1. Copy the full SHA
    5200ff2 View commit details

Commits on May 1, 2017

  1. Copy the full SHA
    4c982cd View commit details

Commits on May 6, 2017

  1. Copy the full SHA
    a1f8143 View commit details

Commits on May 7, 2017

  1. Fix failed tests.

    Add browsers for features which depends on browserslist.
    Semigradsky committed May 7, 2017
    Copy the full SHA
    2ca6df0 View commit details
  2. Merge pull request #373 from SuperOl3g/master

    Added: postcss-image-set-polyfill (#43)
    Semigradsky authored May 7, 2017
    Copy the full SHA
    08dd185 View commit details
  3. Merge pull request #369 from Semigradsky/patch-1

    Update features-activation-map
    Semigradsky authored May 7, 2017
    Copy the full SHA
    e7cb40b View commit details
  4. Copy the full SHA
    480687c View commit details

Commits on May 15, 2017

  1. Copy the full SHA
    b6f4796 View commit details
  2. 2.11.0

    Semigradsky committed May 15, 2017
    Copy the full SHA
    ed02dc8 View commit details
  3. Fix PR link

    Semigradsky committed May 15, 2017
    Copy the full SHA
    974e40b View commit details

Commits on Jun 2, 2017

  1. Copy the full SHA
    af5f9c1 View commit details

Commits on Jul 4, 2017

  1. Change: upgrade to PostCSS 6

    For now just a (stupid) bump of all dependencies.
    
    Some breaking changes:
    
    - image-set polyfill change 2x from 144dpi to 192dpi
    - whitespace changes for image-set polyfill output
    - rebeccapurpule is now an hexa number
    - custom-selector does not output useless (empty) blocks with a selector with no rules associated
    
    You can expect some other since all postcss plugins used have been updated to latest versions. If you have unexpected regression, please check corresponding plugins changelog before opening an issue.
    MoOx committed Jul 4, 2017
    Copy the full SHA
    20ae74d View commit details
  2. Copy the full SHA
    7bb55c1 View commit details
  3. Change: support node4+ up to 8

    No more 0.12 support as some deps require node4+
    MoOx committed Jul 4, 2017
    Copy the full SHA
    cc7c864 View commit details

Commits on Jul 5, 2017

  1. Add a warning for custom property sets that are going to be removed +…

    … an option to hide the warning
    MoOx committed Jul 5, 2017
    Copy the full SHA
    db0f0fa View commit details
  2. Copy the full SHA
    8b99180 View commit details
  3. Docs: Fix id of overflow wrap property in index (#393)

    Map overflow wrap property in index page to correct section id in features
    willowcheng authored and MoOx committed Jul 5, 2017
    Copy the full SHA
    1781dc7 View commit details
  4. Merge pull request #400 from MoOx/postcss6-upgrade

    Postcss6 upgrade
    MoOx authored Jul 5, 2017
    Copy the full SHA
    b7d6ffd View commit details
  5. Docs: fix chalk update issue

    MoOx committed Jul 5, 2017
    Copy the full SHA
    cf9fb19 View commit details
  6. 3.0.0

    MoOx committed Jul 5, 2017
    Copy the full SHA
    03b6017 View commit details
Showing with 10,885 additions and 77 deletions.
  1. +3 −4 .travis.yml
  2. +57 −0 CHANGELOG.md
  3. +0 −1 CONTRIBUTING.md
  4. +1 −2 appveyor.yml
  5. +73 −1 docs/content/features.md
  6. +24 −2 docs/content/index.md
  7. +15 −0 docs/content/playground.html
  8. +4 −2 docs/content/postcss.md
  9. +32 −13 docs/content/usage.md
  10. +51 −0 docs/src/index.css
  11. +2 −2 docs/src/modules/playground/index.js
  12. +5,254 −0 package-lock.json
  13. +36 −28 package.json
  14. +1 −0 src/__tests__/fixtures/features/attribute-case-insensitive.browsers
  15. +1 −0 src/__tests__/fixtures/features/autoprefixer.browsers
  16. +1 −0 src/__tests__/fixtures/features/color-hex-alpha.browsers
  17. +5 −0 src/__tests__/fixtures/features/color-hsl.css
  18. +5 −0 src/__tests__/fixtures/features/color-hsl.expected.css
  19. +1 −1 src/__tests__/fixtures/features/color-rebeccapurple.expected.css
  20. +5 −0 src/__tests__/fixtures/features/color-rgb.css
  21. +5 −0 src/__tests__/fixtures/features/color-rgb.expected.css
  22. +1 −0 src/__tests__/fixtures/features/color-rgba.browsers
  23. +1 −0 src/__tests__/fixtures/features/custom-properties.browsers
  24. +1 −0 src/__tests__/fixtures/features/filter.browsers
  25. +27 −0 src/__tests__/fixtures/features/font-family-system-ui.css
  26. +27 −0 src/__tests__/fixtures/features/font-family-system-ui.expected.css
  27. +1 −0 src/__tests__/fixtures/features/image-set.browsers
  28. +7 −0 src/__tests__/fixtures/features/image-set.css
  29. +9 −0 src/__tests__/fixtures/features/image-set.expected.css
  30. +1 −0 src/__tests__/fixtures/features/initial.browsers
  31. +1 −0 src/__tests__/fixtures/features/overflow-wrap.browsers
  32. +1 −0 src/__tests__/fixtures/features/pseudo-class-matches.browsers
  33. +1 −0 src/__tests__/fixtures/features/pseudo-class-not.browsers
  34. +1 −0 src/__tests__/fixtures/features/pseudo-elements.browsers
  35. +1 −0 src/__tests__/fixtures/features/rem.browsers
  36. +1 −5 src/__tests__/fixtures/regression.expected.css
  37. +1 −1 src/__tests__/index.js
  38. +1 −1 src/__tests__/option.browsers.js
  39. +6 −0 src/__tests__/option.features.js
  40. +59 −0 src/__tests__/option.warnForDeprecations.js
  41. +14 −4 src/__tests__/utils/index.js
  42. +14 −6 src/features-activation-map.js
  43. +12 −0 src/features.js
  44. +8 −0 src/index.js
  45. +37 −0 src/warn-for-deprecations.js
  46. +2 −4 src/warn-for-duplicates.js
  47. +5,074 −0 yarn.lock
7 changes: 3 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -2,10 +2,9 @@ sudo: false

language: node_js
node_js:
- '6'
- '5'
- '4'
- '0.12'
- 8
- 6
- 4

script:
- npm run test
57 changes: 57 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,60 @@
# 3.0.0 - 2017-07-05

## Removed: support for node 0.12

Node 4+ is supported.

## Changed: upgrade to PostCSS 6

All postcss plugins dependencies have been updated to latest version to ensure
full PostCSS 6 compatibility.

Some breaking (minor) changes:

- image-set polyfill change 2x from 144dpi to 192dpi
- whitespace changes for image-set polyfill output
- rebeccapurpule is now an hexa number
- custom-selector does not output useless (empty) blocks with a selector with no rules associated

You can expect some other since all postcss plugins used have been updated to
latest versions.
If you have unexpected regression, please check corresponding plugins changelog before opening an issue.

## Added: warning is emitted is you use custom property sets and `@apply`

This feature won't be included in next the major release of postcss-cssnext.

This most likely won't get any more support from browser vendors as the
spec is yet considered deprecated and alternative solutions are being
discussed.
Read more about the reason here https://github.com/pascalduez/postcss-apply

# 2.11.0 - 2017-05-15

- Added: `image-set()` support
(via [postcss-image-set-polyfill](https://github.com/SuperOl3g/postcss-image-set-polyfill))
([#373](https://github.com/MoOx/postcss-cssnext/pull/373) - @SuperOl3g)
- Added: new auto-deactivation rule in features map
([#369](https://github.com/MoOx/postcss-cssnext/pull/369) - @Semigradsky)

# 2.10.0 - 2017-03-16

- Added: ``system-ui`` keyword to define current System font-size
(via [postcss-font-family-system-ui](https://github.com/JLHwung/postcss-font-family-system-ui))
([#342](https://github.com/MoOx/postcss-cssnext/pull/342) - @JLHwung)
- Added: new auto-deactivation rules in features map
([#345](https://github.com/MoOx/postcss-cssnext/pull/345) - @Semigradsky)

# 2.9.0 - 2016-11-28

- Added: new rgb() & hsl() functional notation
(via
[postcss-color-rgb](https://github.com/dmarchena/postcss-color-rgb) &
[postcss-color-hsl](https://github.com/dmarchena/postcss-color-hsl)
)
([#330](https://github.com/MoOx/postcss-cssnext/pull/330) - @dmarchena)


# 2.8.0 - 2016-09-05

- Added: attribute case insensitive support
1 change: 0 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -29,7 +29,6 @@ module directly in console._
### Add a feature

1. Add test files (input + expected output) in [`src/__tests__/fixtures/features`](src/__tests__/features)
- If the feature can affect some others, update [`src/__tests__/fixtures/cases/example.css`](src/__tests__/cases/example.css) to test integration with other features

- Choose a pretty simple and clear name (that match the specs), if you are not sure, ask using an issue.
- Add the feature in :
3 changes: 1 addition & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -2,10 +2,9 @@

environment:
matrix:
- nodejs_version: 8
- nodejs_version: 6
- nodejs_version: 5
- nodejs_version: 4
- nodejs_version: 0.12

version: "{build}"
build: off
74 changes: 73 additions & 1 deletion docs/content/features.md
Original file line number Diff line number Diff line change
@@ -96,7 +96,7 @@ A nice way to have semantic media queries
}
```

[Specification](http://dev.w3.org/csswg/mediaqueries/#custom-mq)
[Specification](https://drafts.csswg.org/mediaqueries-5/#custom-mq)
|
[Plugin documentation](https://github.com/postcss/postcss-custom-media)

@@ -173,6 +173,23 @@ a {
|
[Plugin documentation](https://github.com/jonathantneal/postcss-nesting)

## `image-set()` function

Allows you to set different images for each kind of resolution of user device.

```css
.foo {
background-image: image-set(url(img/test.png) 1x,
url(img/test-2x.png) 2x,
url(my-img-print.png) 600dpi);
}
```

[Specification](https://drafts.csswg.org/css-images-3/#image-set-notation)
|
[Plugin documentation](https://github.com/SuperOl3g/postcss-image-set-polyfill)


## `color()` function

A color function to modify colors (transpiled to: `rgba()`)
@@ -442,6 +459,61 @@ Allows you to use case insensitive attributes.
|
[Plugin documentation](https://github.com/Semigradsky/postcss-attribute-case-insensitive)

## `rgb()` function (functional-notation)

Allows you to use its new syntax consisting of space-separated arguments and
an optional slash-separated opacity.

You can also use number for color channels.

The alpha value accepts percentage as well as number and has been added to
`rgb()` as optional argument. As a result, `rgb()` and `rgba()` are now
aliases of each other.

```css
div {
background-color: rgb(100 222.2 100.9 / 30%);
}
```

[Specification](https://drafts.csswg.org/css-color/#rgb-functions)
|
[Plugin documentation](https://github.com/dmarchena/postcss-color-rgb)

## `hsl()` function (functional-notation)

Allows you to use its new syntax consisting of space-separated arguments and
an optional slash-separated opacity.

`hsl()` now accepts angles (`deg`, `grad`, `rad`, `turn`) as well as numbers for
hues and an optional percentage or number for alpha value. So, `hsl()` and
`hsla()` are now aliases of each other too.

```css
div {
color: hsl(90deg 90% 70%);
background-color: hsl(300grad 25% 15% / 70%);
}
```

[Specification](https://drafts.csswg.org/css-color/#the-hsl-notation)
|
[Plugin documentation](https://github.com/dmarchena/postcss-color-hsl)

## `system-ui` font-family

Allows you to use `system-ui` generic font-family. The current transformation provides a practical font-family list as fallback.

```css
body {
font-family: system-ui;
}
```

[Specification](https://drafts.csswg.org/css-fonts-4/#valdef-font-family-system-ui)
|
[Plugin documentation](https://github.com/JLHwung/postcss-font-family-system-ui)

## @todo

Any omissions of the CSS specifications (even in draft) that are subject to be
26 changes: 24 additions & 2 deletions docs/content/index.md
Original file line number Diff line number Diff line change
@@ -24,6 +24,7 @@ title: cssnext - Use tomorrow’s CSS syntax, today.
style="vertical-align: middle"
src="https://ghbtns.com/github-btn.html?user=MoOx&repo=postcss-cssnext&type=star&count=true&size=large"
></iframe>
<script async src="//cdn.carbonads.com/carbon.js?zoneid=1673&serve=C6AILKT&placement=cssnextio" id="_carbonads_js"></script>
</div>
</section>
</div>
@@ -72,7 +73,10 @@ title: cssnext - Use tomorrow’s CSS syntax, today.
<a href="/features/#nesting">nesting</a>
</li>
<li class="r-Grid-cell r-minS--1of2">
<a href="/features/#color-function"><code>color()</code> function</a>
<a href="/features/#image-set-function"><code>image-set()</code> function</a>
</li>
<li class="r-Grid-cell r-minS--1of2">
<a href="/features/#color-function"><code>color()</code> function</a>
</li>
<li class="r-Grid-cell r-minS--1of2">
<a href="/features/#hwb-function"><code>hwb()</code> function</a>
@@ -130,14 +134,32 @@ title: cssnext - Use tomorrow’s CSS syntax, today.
</small>
</li>
<li class="r-Grid-cell r-minS--1of2">
<a href="/features/#replace-overflow-wrap"><code>overflow-wrap</code> property</a>
<a href="/features/#overflow-wrap-property-word-wrap-fallback"><code>overflow-wrap</code> property</a>
<small class="cssnext-FeaturesList-small">
(<code>word-wrap</code> fallback)
</small>
</li>
<li class="r-Grid-cell r-minS--1of2">
<a href="/features/#attribute-case-insensitive">attribute case insensitive</a>
</li>
<li class="r-Grid-cell r-minS--1of2">
<a href="/features/#rgb-function-functional-notation"><code>rgb()</code> function</a>
<small class="cssnext-FeaturesList-small">
(functional-notation)
</small>
</li>
<li class="r-Grid-cell r-minS--1of2">
<a href="/features/#hsl-function-functional-notation"><code>hsl()</code> function</a>
<small class="cssnext-FeaturesList-small">
(functional-notation)
</small>
</li>
<li class="r-Grid-cell r-minS--1of2">
<a href="/features/#system-ui-font-family"><code>system-ui</code> font-family</a>
<small class="cssnext-FeaturesList-small">
(font-family fallback)
</small>
</li>
</ul>
<small
class="cssnext-FeaturesList-small"
15 changes: 15 additions & 0 deletions docs/content/playground.html
Original file line number Diff line number Diff line change
@@ -50,13 +50,23 @@
@custom-selector :--heading h1, h2, h3, h4, h5, h6;
:--heading { margin-top: 0 }

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

/* colors stuff */
a {
color: var(--highlightColor);
transition: color 1s; /* autoprefixed ! */
}
a:hover { color: gray(255, 50%) }
a:active { color: rebeccapurple }
a:focus { background-color: rgb(255 153 0 / 33%); outline: 3px solid hsl(1turn 60% 50%); }
a:any-link { color: color(var(--highlightColor) blackness(+20%)) }

/* font stuff */
@@ -84,6 +94,11 @@
/* attribute case insensitive */
[frame=hsides i] {
border-style: solid none;
}

/* system-ui font-family */
body {
font-family: system-ui;
}

</textarea>
6 changes: 4 additions & 2 deletions docs/content/postcss.md
Original file line number Diff line number Diff line change
@@ -114,7 +114,8 @@ grunt.initConfig({
// add your "plugins" here
// ...
// and if you want to compress
// require("cssnano")(),
// Disable autoprefixer, because it's already included in cssnext
// require("cssnano")({ autoprefixer: false }),
require("postcss-browser-reporter")(),
require("postcss-reporter")(),
]
@@ -147,7 +148,8 @@ gulp.task('css', function () {
// add your "plugins" here
// ...
// and if you want to compress
// require("cssnano")(),
// Disable autoprefixer, because it's already included in cssnext
// require("cssnano")({ autoprefixer: false }),
require("postcss-browser-reporter")(),
require("postcss-reporter")(),
]))
45 changes: 32 additions & 13 deletions docs/content/usage.md
Original file line number Diff line number Diff line change
@@ -37,28 +37,40 @@ _Features are enabled by default: no key means feature is enabled_. Keys can be

```js
//eg: disable custom properties support
var output = cssnext(input, {
features: {
customProperties: false
}
})

var postcss = require("postcss")
var cssnext = require("postcss-cssnext")

postcss([
cssnext({
features: {
customProperties: false
}
})
])
```

Each feature is based on PostCSS plugins & can get its own options.
To pass options to a feature, you can just pass an object to the feature:

```js
//eg: pass variables
var output = cssnext(input, {
features: {
customProperties: {
variables: {
mainColor: "red",
altColor: "blue",

var postcss = require("postcss")
var cssnext = require("postcss-cssnext")

postcss([
cssnext({
features: {
customProperties: {
variables: {
mainColor: "red",
altColor: "blue",
}
}
}
}
})
})
])
```

## `warnForDuplicates`
@@ -72,6 +84,13 @@ and show provide duplicates in their examples.
(eg: autoprefixer + cssnext - but cssnext already includes autoprefixer).**
_In order to fix this, here is a warning. You are welcome._

## `warnForDeprecations`

_(default: true)_

This option should be left with its default value, unless you are aware of the
risk and plan to handle the situation.

---

**To know all available options, please check corresponding postcss plugin by
Loading