FlipED icon indicating copy to clipboard operation
FlipED copied to clipboard

Update autoprefixer to the latest version 🚀

Open greenkeeper[bot] opened this issue 8 years ago • 67 comments

Version 7.0.0 of autoprefixer just got published.

Dependency autoprefixer
Current Version 6.7.7
Type devDependency

The version 7.0.0 is not covered by your current version range.

Without accepting this pull request your project will work just like it did before. There might be a bunch of new features, fixes and perf improvements that the maintainers worked on for you though.

I recommend you look into these changes and try to get onto the latest version of autoprefixer. Given that you have a decent test suite, a passing build is a strong indicator that you can take advantage of these changes by merging the proposed change into your project. Otherwise this branch is a great starting point for you to work on the update.


Release Notes 7.0 “Coelestem adspicit lucem”

University of Copenhagen coat of arms

Autoprefixer 7.0 uses PostCSS 6.0, Browserslist 2.0 and caniuse-lite.

Browserslist 2.0

Browserslist 2.0 and caniuse-lite by @ben-eb are the main changes in Autoprefixer 7.0. We wrote an article about these changes:

> Autoprefixer 7.0 and Browserslist 2.0

Breaking Changes

Node.js stopped 0.12 support in January 01. So PostCSS dropped Node.js 0.12 from all tests. Please update your Node.js version to 4.0 or 7.0.

IE has very basic support of Grid Layout. So Autoprefixer added -ms- prefixes and change property syntax. Unfortunately, IE supports a really small subset of Grid Layout. So prefixes were not really useful. This is why we disabled Grid Layout prefixes by default. But you still can enable it:

autoprefixer({ grid: true })

Babel

Autoprefixer was one of the biggest CoffeeScript projects. We thought to rewrite it, but reasons were small, and work was big. But @Semigradsky used great decaffeinate tool for automatically CoffeeScript → ES6 converting, and now all Autoprefixer sources are written in JS.

PostCSS 6.0

New PostCSS uses stream parser and uses less memory. Also, it uses less space in node_modules.

Other Changes

  • Use ^ for Browserslist dependencies, instead of ~.
  • Fix -ms-grid-column-align.
  • Move tests to Jest.
Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot :palm_tree:

greenkeeper[bot] avatar May 06 '17 14:05 greenkeeper[bot]

Version 7.0.1 just got published.

Update to this version instead 🚀

Release Notes 7.0.1
  • Fix Autoprefixer for old JS runtimes.

greenkeeper[bot] avatar May 07 '17 16:05 greenkeeper[bot]

Version 7.1.0 just got published.

Update to this version instead 🚀

Release Notes 7.1 “Universitas litterarum”

Humboldt University of Berlin coat of arms

Autoprefixer 7.1 brings unicode-bidi support, -webkit-appearance to Edge and fix intrinsic widths prefixes in Grid Layout.

unicode-bidi

Autoprefixer 7.1 will add prefixes for isolate, plaintext and isolate-override values in unicode-bidi:

.foo {
  unicode-bidi: -webkit-isolate;
  unicode-bidi: isolate;
}

Edge and -webkit-appearance

Prefixes sometime could be very strange. Edge started to support appearance property with a prefix. But because of many only-for-Safari websites it supports -webkit-appearance instead of -ms-appearance.

Autoprefixer 7.1 knows it and will generate -webkit-appearance even if you set only "last 1 Edge version" in browserslist config.

Intrinsic Widths

min-content, stretch and other Intrinsic sizes was fixed in grid-template-columns and other Grid Layout properties.

.foo {
  grid-template-columns: minmax(100px, -webkit-min-content);
  grid-template-columns: minmax(100px, min-content);
}

Browserslist in info()

By accident Browserslist 1 loaded config from current working dir if file path was missed. In Browserslist 2 we fixed it and now you must specify path to file in explicit way.

It is not a problem for Autoprefixer user, because Autoprefixer takes CSS file path from PostCSS.
But autoprefixer.info() stopped to load conifg in 7.0. In 7.1 we added from option to info().

Set the path to your CSS file and info() will show what prefixes and why it will added to this CSS file:

autoprefixer.info({ from: './scr/app.css' })
//=> Browsers:
//     Chrome: 58
//
//   These browsers account for 1.68% of all users globally
//
//   Selectors:
//     :fullscreen: webkit
//

greenkeeper[bot] avatar May 15 '17 00:05 greenkeeper[bot]

Version 7.1.1 just got published.

Update to this version instead 🚀

Release Notes 7.1.1
  • Remove non--webkit- intrinsic prefixes in Grid Layout (by @yisibl).

greenkeeper[bot] avatar May 20 '17 20:05 greenkeeper[bot]

Version 7.1.2 just got published.

Update to this version instead 🚀

Release Notes 7.1.2
  • Fix text-decoration shortcut support.

greenkeeper[bot] avatar Jul 06 '17 15:07 greenkeeper[bot]

Version 7.1.3 just got published.

Update to this version instead 🚀

greenkeeper[bot] avatar Aug 28 '17 05:08 greenkeeper[bot]

Version 7.1.4 just got published.

Update to this version instead 🚀

greenkeeper[bot] avatar Sep 07 '17 05:09 greenkeeper[bot]

Version 7.1.5 just got published.

Update to this version instead 🚀

Release Notes 7.1.5
  • Fix ::placeholder prefix for Edge.
  • Fix inherit/initial/unset values for flex-direction.
  • Fix RegExp usage in gradients (by @YetAnotherMinion).

greenkeeper[bot] avatar Oct 06 '17 21:10 greenkeeper[bot]

Version 7.1.6 just got published.

Update to this version instead 🚀

Release Notes 7.1.6
  • Add warning for using browserslist option instead of browsers.
  • Add warning for multiple control comments in the same scope.
  • Fix Invalid array length error during indent changes.

greenkeeper[bot] avatar Oct 21 '17 23:10 greenkeeper[bot]

Version 7.2.0 just got published.

Update to this version instead 🚀

Release Notes 7.2 “Ordem e Progresso”

Coat of arms of Brazil

Autoprefixer 7.2 brings better Grid support for IE
and autoprefixer-info CLI tool.

Grid Layout

With grid: true option Autoprefixer adds -ms- prefixes to Grid Layout properties. But this feature was very limited.

In 7.0 we dramatically improved Grid support for IE. @Alex7Kom added grid-area and improved grid-row and grid-column support. @evgeny-petukhov added grid-template-areas and grid-template support.

Even this complex emoji example will work with new Autoprefixer (output):

body {
    display: grid;
    grid-template-rows: auto 300px;
    grid-template-columns: 3fr 1fr;
    grid-template-areas: "🎩 🎩"
                         "🍔 📰"
                         "👞 👞";
}
header {
    grid-area: 🎩;
}
nav {
    grid-area: 🍔;
}
main {
    grid-area: 📰;
}
footer {
    grid-area: 👞;
}

Just don’t forget to set grid: true option:

auoprefixer({ grid: true })

Info CLI Tool

Autoprefixer 7.2 ships with new CLI tool to check which browsers are selected and which properties will be prefixed.

Just go to your project directory and run npx autoprefixer-info:

Browsers:
  Edge: 16

These browsers account for 0.04% of all users globally

At-Rules: @viewport: ms

Selectors: ::placeholder: ms

Properties: user-select: ms hyphens: ms appearance: webkit scroll-snap-type: ms scroll-snap-coordinate: ms scroll-snap-destination: ms scroll-snap-points-x: ms scroll-snap-points-y: ms flow-into: ms flow-from: ms region-fragment: ms text-spacing: ms

Also, @pdokas added default value (current working dir) for from option in autoprefixer.info().

Other Changes

  • Add wrong radial-gradient properties warning.
  • Do not prefix reverse animation direction.
  • Improve test coverage (by @Semigradsky).

greenkeeper[bot] avatar Dec 03 '17 17:12 greenkeeper[bot]

Version 7.2.1 just got published.

Update to this version instead 🚀

Release Notes 7.2.1
  • Fix IE and other old JS runtimes support.

greenkeeper[bot] avatar Dec 04 '17 02:12 greenkeeper[bot]

Version 7.2.2 just got published.

Update to this version instead 🚀

Release Notes 7.2.2
  • Fix _autoprefixerDisabled is undefined issue.

greenkeeper[bot] avatar Dec 08 '17 02:12 greenkeeper[bot]

Version 7.2.3 just got published.

Update to this version instead 🚀

Release Notes 7.2.3

greenkeeper[bot] avatar Dec 13 '17 19:12 greenkeeper[bot]

Version 7.2.4 just got published.

Update to this version instead 🚀

Release Notes 7.2.4

Fix IE 10 support

greenkeeper[bot] avatar Jan 02 '18 08:01 greenkeeper[bot]

Version 7.2.5 just got published.

Update to this version instead 🚀

Release Notes 7.2.5
  • Fix multiple prefixes in declaration value.

greenkeeper[bot] avatar Jan 12 '18 12:01 greenkeeper[bot]

Version 7.2.6 just got published.

Update to this version instead 🚀

greenkeeper[bot] avatar Feb 09 '18 22:02 greenkeeper[bot]

Version 8.0.0 just got published.

Update to this version instead 🚀

greenkeeper[bot] avatar Feb 12 '18 00:02 greenkeeper[bot]

Version 8.1.0 just got published.

Update to this version instead 🚀

Release Notes 8.1 “Rex, Familia et Ultio”

Kingdom Come: Deliverance logo

Autoprefixer 8.1 brings overscroll-behavior and better Grid support.

Overscroll Behavior

@Malvoz suggested the great idea to polyfill overscroll-behavior for IE 11 and Edge by -ms-scroll-chaining.

.none {
    -ms-scroll-chaining: none;
        overscroll-behavior: none;
}
.contain {
    -ms-scroll-chaining: none;
        overscroll-behavior: contain;
}
.auto {
    -ms-scroll-chaining: chained;
        overscroll-behavior: auto;
}

Note, that overscroll-behavior-x and overscroll-behavior-y are not supported since -ms- property doesn’t have this freedom.

Better Grid Layout

@evgeny-petukhov continues his amazing work and now Autoprefixer polyfills Grid Layout for IE in more cases.

He added grid-template shortcut support and improve support of grid-column-end and grid-row-end.

Grid properties were fixed in @supports. We recommend:

  • To select modern Grid browsers and IE 11: @supports (display: grid).
  • To select only Grid browsers without IE 11: @supports (grid-gap: 0).

Note, that you need grid: true option to Autoprefixer to add -ms- prefixes for Grid Layout.

greenkeeper[bot] avatar Mar 03 '18 01:03 greenkeeper[bot]

Version 8.2.0 just got published.

Update to this version instead 🚀

Release Notes 8.2 “Ad Astra per Aspera”

The Great Seal of the State of Kansas

Autoprefixer 8.2 brings color-adjust support.

@YozhikM, @soul-wish, and @yuriyalekseyev did a great work. They added new data to Can I Use and implemented a new feature to Autoprefixer.

body {
    -webkit-print-color-adjust: exact;
            color-adjust: exact;
}

greenkeeper[bot] avatar Mar 22 '18 00:03 greenkeeper[bot]

Version 8.3.0 just got published.

Update to this version instead 🚀

Release Notes 8.3 “Benigno Numine”

Seal of the City of Pittsburgh

Autoprefixer 8.3 adds @media support for grid-template and fixes gradient direction warning.

Media and Grid Layout

@evgeny-petukhov continues his great work for Grid Layout support in Autoprefixer.

Now he improved @media support. Now this CSS will work in IE:

body {
    grid-template:
        [header-left] "head head" 30px [header-right]
        [main-left]   "nav  main" 1fr  [main-right]
        [footer-left] "nav  foot" 30px [footer-right]
        / 120px repeat(4, 250px 10px);
}

header { grid-area: head; }

main { grid-area: main; }

footer { grid-area: footer; }

@media (min-width: 1000px) { body { grid-template: [header-left] "head" 30px [header-right] [main-left] "main" 1fr [main-right] [footer-left] "footer" 30px [footer-right] / 1fr; } }

Don’t forget that Autoprefixer inserts Grid Layout prefixes only if you set grid: true option.

Gradient Warning

@radium-v found that Autoprefixer show warning even if cover is outside of radial-gradient.

a {
    background: radial-gradient(#fff, transparent) 0 0 / cover no-repeat #f0f;
}

@kotfire improve old direction detection and fix this issue.

greenkeeper[bot] avatar Apr 16 '18 03:04 greenkeeper[bot]

Version 8.4.0 just got published.

Update to this version instead 🚀

Release Notes 8.4 “Non in aves, sed in angues”

Bludor family coat of arms

Autoprefixer 8.4 brings new control comment to ignore next line.

@vostrik implemented the @levin-du’s idea of having control comment to disable only next property/rule:

.logo {
    /* autoprefixer: ignore next */
    user-select: none; /* ← ignored */
    mask: url(mask.jpg); /* ← will be prefixed */
}

/ autoprefixer: ignore next / ::placholder / ← ignored / { text-decoration-style: dotted; / ← will be prefixed / }

greenkeeper[bot] avatar Apr 28 '18 07:04 greenkeeper[bot]

Version 8.5.0 just got published.

Update to this version instead 🚀

Release Notes 8.5 “Muito Nobre e Sempre Leal”


Coat of arms of Lisbon

Autoprefixer 8.5 brings grid-gap support and fix radial-gradient.

Grid Gap

@evgeny-petukhov continues his amazing work of adding CSS Grid Layout support to Autoprefixer.

Now he brought grid-gap. It is amazing work since IE 11 has gaps support in -ms- grids.

To add grid-gap support for IE 11 Autoprefixer adds addition grid cells. Unfortunately, it will work only if you have grid-template in the same rule with grid-gap. We had big discussion with a community about these limits.

.page {
    grid-gap: 33px;
    -ms-grid-rows: 1fr 33px minmax(100px, 1fr) 33px 2fr;
    -ms-grid-columns: 1fr 33px 100px 33px 1fr;
    grid-template:
        "head head  head" 1fr
        "nav  main  main" minmax(100px, 1fr)
        "nav  foot  foot" 2fr /
        1fr   100px 1fr;
}

Set postcss-gap-properties before Autoprefixer if you want to use new gap property.

Radial Gradients

Old gradients with prefixes used a different direction syntax. Autoprefixer converts direction to old syntax (or warn you to rewrite direction from old to new syntax).

But it has an issue with extent keywords like circle closest-corner. We fixed it after @BaliBalo report.

.mask {
    -webkit-mask-image: -webkit-radial-gradient(100% 50%, circle closest-corner, black, white);
            mask-image: radial-gradient(circle closest-corner at 100% 50%, black, white);
}

greenkeeper[bot] avatar May 13 '18 08:05 greenkeeper[bot]

Version 8.5.1 just got published.

Update to this version instead 🚀

Release Notes 8.5.1
  • Remove unnecessary warning on -webkit-fill-available.

greenkeeper[bot] avatar May 25 '18 11:05 greenkeeper[bot]

Version 8.6.0 just got published.

Update to this version instead 🚀

Release Notes 8.6 “Follow Reason”

Emblem of the Grand Lodge of Massachusetts

Autoprefixer 8.6 brings gap property support and two values support for grid-gap/gap.

Grid Gap

CSSWG renamed grid-gap property to gap.

@yepninja added gap support with 2 values support.

Grid layout code bellow will work even in IE if you pass grid: true option to Autoprefixer:

.main {
    gap: 10px 20px;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-areas: "head head head"
                         "nav main main"
                         "nav foot foot";
}

Other Changes

greenkeeper[bot] avatar Jun 02 '18 17:06 greenkeeper[bot]

Version 8.6.1 just got published.

Update to this version instead 🚀

Release Notes 8.6.1
  • Fix grid-template with media queries (by @yepninja)

greenkeeper[bot] avatar Jun 07 '18 14:06 greenkeeper[bot]

Version 8.6.2 just got published.

Update to this version instead 🚀

Release Notes 8.6.2
  • Fix error during adding Grid prefixes in @media (by @yepninja).

greenkeeper[bot] avatar Jun 09 '18 11:06 greenkeeper[bot]

Version 8.6.3 just got published.

Update to this version instead 🚀

Release Notes 8.6.3
  • Add warnings for unsupported Grid features.
  • Add warnings about wrong Grid properties.
  • Add note about grid option for grid properties in autoprefixer --info.

greenkeeper[bot] avatar Jun 18 '18 13:06 greenkeeper[bot]

Version 8.6.4 just got published.

Update to this version instead 🚀

Release Notes 8.6.4
  • Fix stretch prefix in Chrome >= 46.

greenkeeper[bot] avatar Jun 26 '18 15:06 greenkeeper[bot]

Version 8.6.5 just got published.

Update to this version instead 🚀

Release Notes 8.6.5
  • Do not show Grid warnings if IE was not selected

greenkeeper[bot] avatar Jul 06 '18 05:07 greenkeeper[bot]

Version 9.0.0 just got published.

Update to this version instead 🚀

Release Notes 9.0 “A Mari Usque Ad Mare”

This is a good article. Follow the link for more information.
Arms of Canada

Autoprefixer 9.0 brings Browserslist 4.0 and drops Node.js 4 support.

Breaking Changes

We removed Node.js 4 and Node.js 9 support since it doesn’t have security updates anymore.

We removed IE and “dead” browsers (without security updates) from Babel’s targets:

last 2 version
not dead
not Explorer 11
not ExplorerMobile 11
node 10
node 8
node 6

Autoprefixer Rails 9.0 dropped the RubyRacer and Sprockets 3 support.

Browserslist 4.0

Autoprefixer 9.0 uses Browserslist 4.0 to get your target browsers.

Now you use Browserslist to specify Node.js versions. Babel 7 will use Browserslist config as well.

Also, Browserslist 4.0 will warn you if you didn’t update Can I Use DB for last than 6 month.

PostCSS 7.0

Autoprefixer 9.0 uses PostCSS 7.0

greenkeeper[bot] avatar Jul 16 '18 22:07 greenkeeper[bot]

Version 9.0.1 just got published.

Update to this version instead 🚀

Release Notes 9.0.1
  • Fix nested at-rules in Grid prefixes (by @ivandata)

greenkeeper[bot] avatar Jul 21 '18 18:07 greenkeeper[bot]