GitXplorerGitXplorer
k

ember-cli-autoprefixer

public
103 stars
25 forks
17 issues

Commits

List of commits on branch master.
Verified
4053bc53635710a97773803a4bf0e1e0aa1f63c6

Move ember-cli-htmlbars to devDependencies (#80)

SSergeAstapov committed 3 years ago
Verified
2606d27e3d7b853d2d87b26d2b79d453aaddc356

Run ember-cli-update to v3.28.4 to align with the latest addon blueprint (#79)

SSergeAstapov committed 3 years ago
Verified
fa1fc1bfcff6e16bb0449000149a11834acb03bd

Fix ci by updating ember-auto-import, ember-quit, ember-template-lint (#78)

SSergeAstapov committed 3 years ago
Verified
e94e3a5b7b24295a8a52e9219f58eac3090f6892

Add CHANGELOG for v1.0.3 and v2.0.0 (#77)

SSergeAstapov committed 3 years ago
Unverified
795600941fff3dc06d02876b8c5365a97ab6b247

2.0.0

ssnewcomer committed 3 years ago
Verified
6db8a7c0ec29617498c30acfaae0290ad32f09d4

Remove Node 10 (#75)

ssnewcomer committed 3 years ago

README

The README file for this repository.

Autoprefixer for Ember CLI Build Status

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

Compatibility

  • Ember.js v3.20 or above
  • Ember CLI v3.20 or above
  • Node.js v12 or above

Installation

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