1.1 “Nutrisco et extingo”
Notable Changes
Autoprefixer 1.1 based on PostCSS 0.3 “Prince Seere” with great improvements in source map support:
-
Add source map annotation comment support.* Autoprefiixer now reads/writes annotation comment to end of CSS file, if map support is enabled.
-
Add inline source map support. It will be really helpful for LESS users.
-
Autodetect previous source map. If input CSS will contain annotation comment with inline map, Autoprefixer will read previous map, update it with prefixes changes and inline back to comment. If you set
from
option with input CSS file path and Autoprefixer will find map file near input CSS, it will read map, update and write new map file. You can disable autodetect bymap: false
option. -
Fix source map support on Windows and in subdirectories.* PostCSS 0.3 is much smarter with previous map support (maybe now it has best support for chain CSS tranformations with source maps). @nDmitry and @lydell did a great investigation about special cases with source map.
-
Optional visual cascade of prefixes. This behavior is disabled by default yet, but you can enable it with
cascade
option.a { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box }
-
Autoprefixer now has nice interactive demo by @simevidas.
* grunt-autoprefixer already had this fixes. @nDmitry covered Autoprefixer and fixed them by hacks.
API Changes
- Deprecated API from 0.8 version was removed. Use
process(from: "a.css").css
instead ofcompile(file: "a.css")
andinfo()
instead ofinspect()
. - Add new
inlineMap
,mapAnnotation
options to control source map support. Read about them in PostCSS documentation.
Fixes
- Autoprefixer now adds prefix delector even if it is already prefixed by developer. @necolas find a lot of cases, when property logic can be used in selectors.
- Better flexbox support by @Rowno.
flex
property values now will be converted for oldbox-flex
syntax.flex-basis
,flex-shrink
andflex-grow
will be converted to separated properties for IE 10, instead of oneflex
property. - Better
break-inside
support by hacks suggested in great investigation by @InterPaul. - Autoprefixer now smarter groups prefixed and unprefixed properties and better wprks when you write two same properties near by (for example, two
transform
with and withoutcalc()
).