Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

ember-cli-autoprefixer

kimroen130.9kMIT2.0.0

Process styles in an ember-cli application using Autoprefixer

ember-addon, autoprefixer, css, prefix, preprocess

readme

Autoprefixer for Ember CLI Build Status

This addon runs the styles of your Ember CLI-project through Autoprefixer.

Install

To install, run

ember install ember-cli-autoprefixer

Options

This addon first consumes your browser list config from config/targets.js. This is the browser list for Babel.

You can manually configure what browsers to target for autoprefixer only. Add the target browsers to your package.json as per https://github.com/browserslist/browserslist#readme, add a .browserslistrc file, or configure overrideBrowsersList in ember-cli-build.js.

// ember-cli-build.js
var app = new EmberApp(defaults, {
  autoprefixer: {
    overrideBrowserslist: ['IE11'],
    cascade: false
  }
});

This would prefix styles as required by the two latest version of ios, and disable the cascade (see below).

You can disable Autoprefixer by passing in enabled: false.

Other options would also go here along with overrideBrowserslist, enabled and cascade.

You can read more about these settings and others over on the Autoprefixer page.

Note on using with ember-cli-sass

Autoprefixer doesn't play well with .css.map files, but it will work with embedded source maps. This means there are two options.

If you want to disable CSS sourcemaps from ember-cli-sass update ember-cli-build.js to

  sassOptions: {
    // This tells ember-cli-sass to avoid generating the sourcemap file (like vendor.css.map)
    sourceMap: false
  }

Alternatively, you may use embedded source maps. So we tell ember-cli-sass to embed the sourcemaps and then turn on sourcemaps with autoprefixer which will update the embedded sourcemap after adding prefixes.

  sassOptions: {
    sourceMap: true,
    sourceMapEmbed: true
  },
  autoprefixer: {
    enabled: true,
    cascade: true,
    sourcemap: true
  }

Also note you can optionally disable in production!

  const envIsProduction = (process.env.EMBER_ENV === 'production');

  ...

  sassOptions: {
    sourceMap: !envIsProduction,
    sourceMapEmbed: !envIsProduction
  },
  autoprefixer: {
    enabled: true,
    cascade: true,
    sourcemap: !envIsProduction
  }

References

changelog

Changelog

All notable changes to this project will be documented in this file. Dates are displayed in UTC.

Generated by auto-changelog.

v1.0.2

28 May 2020

  • Use app targets for autoprefixer as last fallback #53

v1.0.1

26 May 2020

  • Pass through config/targets to autoprefixer #51
  • Bump acorn from 5.7.3 to 5.7.4 #48
  • Check if browserlistrc file or config f586ccc
  • Improve readme 25868d3
  • cleanup d9f44ce

v1.0.0

17 February 2020

  • Add information about using with ember-cli-sass #46
  • Update README a0657cc
  • Update CHANGELOG 1.0.0-beta.0 09aff3d

v1.0.0-beta.0

14 February 2020

  • Feature/update libraries #45

v0.8.1

19 September 2017

  • run autoprefix before asset fingerprinting #39
  • Add a CHANGELOG entry for #39 104a7d2

v0.8.0

26 August 2017

  • Bump broccoli-autoprefixer & drop node .12 support 41f7edc
  • Add CHANGELOG entry for #36 and #37 b0ea8d5

v0.7.0

22 April 2017

  • Add support for new targets feature in ember-cli. d339c9b
  • Changelog entry for #34 b7324e8

v0.6.0

21 February 2016

  • Update ember addon project and some dependencies #29
  • Adding support for nesting this addon #27
  • Upgrade Addon via ember init #22
  • Update addon with ember init and tweaks ac52a24
  • Readme tweaks a4d2e0f
  • Update lodash dependency 706384a

v0.5.0

5 September 2015

  • Update broccoli-autoprefixer #21
  • Note the new ember-cli-build.js file for ember-cli 1.13+ #19
  • Update readme 69b1461
  • Add version 0.5.0 to the changelog 1b2424c
  • Ignore jshint-file 5c49a00

v0.4.1

2 June 2015

  • add tmp dir to npmignore for #15 #16
  • Update changelog 66ad641
  • add tmp dir to npmignore e4db969

v0.4.0

31 May 2015

  • Update broccoli-autoprefixer dependency. #14
  • Upgrade to ember-cli 0.2.0 #10
  • Update: ember addon ember-cli-autoprefixer #8
  • Update broccoli-autoprefixer dependency. #13
  • ember addon ember-cli-autoprefixer 5ba5759
  • Updated deps c1fd95e
  • Update README and CHANGELOG ef86f62

v0.3.0

31 January 2015

  • Add support for disabling autoprefixer #7
  • Bump broccoli-autoprefixer e084307
  • Update changelog 48426af
  • Bump version number in changelog a280074

v0.2.0

22 November 2014

  • Bump broccoli-autoprefixer #5
  • Create a changelog and populate it for version 0.2.0 0f9902f

v0.1.0

23 August 2014

  • Update broccoli-autoprefixer 9858faa

v0.0.3

7 August 2014

  • Update to latest broccoli-autoprefixer #3
  • Create LICENSE cf10e83
  • Update README 85c44be

v0.0.2

31 July 2014

  • Update broccoli-autoprefixer #2
  • Mention other options b071657

v0.0.1

6 July 2014