Ckeditor5: [postCSS] Disable merging keyframes animations

Created on 27 Dec 2017  路  1Comment  路  Source: ckeditor/ckeditor5

We need to add reduceIdents: true option to minified build, to prevent merging animations from separated stylesheets into one.

http://cssnano.co/optimisations/reduceidents/

https://github.com/ckeditor/ckeditor5-dev/blob/7f6063723d77c24110fcac591f184b4b1ab3221a/packages/ckeditor5-dev-utils/lib/styles/getpostcssconfig.js#L35-L40

cc @oleq

dev bug

Most helpful comment

This became an issue because CSS files are processed individually by cssnano (css-loader reads .css imports and then passes them to PostCSS). Long story short, cssnano optimizes imports ignorant of the big picture, always using the same defaults, which then collide when merged into an output CSS.

So if FooView imports foo.css containing some @keyframes foo {} and BarView imports bar.css containing @keyframes bar {}, cssnano converts them both to

/* from foo.css */
@keyframes a {} 
/* from bar.css */
@keyframes a {}

to save bytes because it is not aware of the collision.

>All comments

This became an issue because CSS files are processed individually by cssnano (css-loader reads .css imports and then passes them to PostCSS). Long story short, cssnano optimizes imports ignorant of the big picture, always using the same defaults, which then collide when merged into an output CSS.

So if FooView imports foo.css containing some @keyframes foo {} and BarView imports bar.css containing @keyframes bar {}, cssnano converts them both to

/* from foo.css */
@keyframes a {} 
/* from bar.css */
@keyframes a {}

to save bytes because it is not aware of the collision.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pjasiun picture pjasiun  路  3Comments

metalelf0 picture metalelf0  路  3Comments

Reinmar picture Reinmar  路  3Comments

pomek picture pomek  路  3Comments

oleq picture oleq  路  3Comments