web 3d图形渲染器
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

421 lines
18 KiB

  1. ## 4.2.0 (November 26, 2020)
  2. - Trim Custom Property values when possible (#393)
  3. - Fixed removing unit for zero-length dimentions in `min()`, `max()` and `clamp()` functions (#426)
  4. - Fixed crash on bad value in TRBL declaration value (#412)
  5. ## 4.1.1 (November 15, 2020)
  6. - Fixed build setup to exclude full `mdn/data` that reduced the lib size:
  7. * dist/csso.js: 794.5Kb -> 255.2Kb
  8. * dist/csso.min.js: 394.4Kb -> 194.2Kb
  9. * package size: 237.8 kB -> 156.1 kB
  10. * package unpacked size: 1.3 MB -> 586.8 kB
  11. ## 4.1.0 (October 27, 2020)
  12. - Bumped [CSSTree](https://github.com/csstree/csstree) to `^1.0.0`
  13. - Fixed wrongly merging of TRBL values when one of them contains `var()` (#420)
  14. - Fixed wrongly merging of pseudo class and element with the same name, e.g. `:-ms-input-placeholder` and `::-ms-input-placeholder` (#383, #416)
  15. - Fixed wrongly merging of `overflow` fallback (#415)
  16. ## 4.0.3 (March 24, 2020)
  17. - Prevented percent sign removal in `flex`/`-ms-flex` (#410)
  18. - Fixed restructuring optimisation in some cases (@charlessuh & @chsuh, #358, #411)
  19. - Bumped dependencies (@AviVahl, #409)
  20. ## 4.0.2 (October 28, 2019)
  21. - Fixed clean stage to avoid exceptions when source has unparsed or bad parts (#380)
  22. - Fixed wrong percentage sign removal for zero values (#395)
  23. ## 4.0.1 (October 22, 2019)
  24. - Bumped CSSTree to [`1.0.0-alpha.37`](https://github.com/csstree/csstree/releases/tag/v1.0.0-alpha.37) to avoid source map generation inconsistency across Node.js versions
  25. ## 4.0.0 (October 21, 2019)
  26. - Dropped support for Node.js < 8
  27. - Refreshed dev dependencies and scripts
  28. - Bumped [CSSTree](https://github.com/csstree/csstree) to `1.0.0-alpha.36` (#399)
  29. - Changed bundle files: `dist/csso.js` and `dist/csso.min.js` instead single `dist/csso-browser.js` (min version)
  30. - Expose `compress()` as `syntax.compress()`
  31. ## 3.5.1 (June 7, 2018)
  32. - Bumped [CSSTree](https://github.com/csstree/csstree) to `1.0.0-alpha.29` (fixes some issues)
  33. ## 3.5.0 (January 14, 2018)
  34. - Migrated to [CSSTree](https://github.com/csstree/csstree) `1.0.0-alpha.27`
  35. ## 3.4.0 (November 3, 2017)
  36. - Added percent sign removal for zero percentages for some properties that is safe (@RubaXa, #286)
  37. - Removed unit removal for zero values in `-ms-flex` due it breaks flex in IE10/11 (#362)
  38. - Improved performance of selectors comparison (@smelukov, #343)
  39. ## 3.3.1 (October 17, 2017)
  40. - Fixed merge of `position` declarations when `sticky` fallback is using (@gruzzilkin, #356)
  41. ## 3.3.0 (October 12, 2017)
  42. - Migrated to [CSSTree](https://github.com/csstree/csstree) `1.0.0-alpha25`
  43. - Changed AST format (see [CSSTree change log](https://github.com/csstree/csstree/blob/master/HISTORY.md) for details)
  44. - Fixed performance issue when generate CSS with source map (quadratic increase in time depending on the size of the CSS)
  45. ## 3.2.0 (September 10, 2017)
  46. - Fixed named color compression to apply only when an identifier is guaranteed to be a color
  47. - Added lifting of `@keyframes` to the beginning of style sheet (chunk), but after `@charset` and `@import` rules
  48. - Added removal of `@keyframes`, `@media` and `@supports` with no prelude
  49. - Added removal of duplicate `@keyframes` (#202)
  50. - Added new option `forceMediaMerge` to force media rules merging. It's unsafe in general, but works fine in many cases. Use it on your own risk (#350)
  51. - Bumped `CSSTree` to `1.0.0-alpha23`
  52. ## 3.1.1 (April 25, 2017)
  53. - Fixed crash on a number processing when it used not in a list (#335)
  54. ## 3.1.0 (April 24, 2017)
  55. - Implemented optimisation for `none` keyword in `border` and `outline` properties (@zoobestik, #41)
  56. - Implemented replacing `rgba(x, x, x, 0)` to `transparent`
  57. - Fixed plus sign omitting for numbers following identifier, hex color, number or unicode range, since it can change the meaning of CSS (e.g. `calc(1px+2px)` has been optimized to `calc(1px2px)` before, now it stays the same)
  58. - Improved usage filtering for nested selectors (i.e. for `:nth-*()`, `:has()`, `:matches` and other pseudos)
  59. - Implemented `blacklist` filtering in usage (#334, see [Black list filtering](https://github.com/css/csso#black-list-filtering))
  60. - Improved white space removing, now white spaces are removing in the beginning and at the ending of sequences, and between stylesheet and block nodes
  61. - Bumped `CSSTree` to `1.0.0-alpha19`
  62. ## 3.0.1 (March 14, 2017)
  63. - Fixed declaration merging when declaration contains an `!important`
  64. ## 3.0.0 (March 13, 2017)
  65. - Migrated to [CSSTree](https://github.com/csstree/csstree) as AST backend and exposed its API behind `syntax` property
  66. - Extracted CLI into standalone package [css/csso-cli](https://github.com/css/csso-cli)
  67. ## 2.3.1 (January 6, 2017)
  68. - Added `\0` IE hack support (#320)
  69. ## 2.3.0 (October 25, 2016)
  70. - Added `beforeCompress` and `afterCompress` options support (#316)
  71. - Fixed crash on empty argument in function (#317)
  72. ## 2.2.1 (July 25, 2016)
  73. - Fixed shorthand optimisation issue when value has a color value or something unknown (#311)
  74. - Fixed `cursor` broken fallback (#306)
  75. ## 2.2.0 (June 23, 2016)
  76. - Implement AST cloning by adding `clone()` [function](https://github.com/css/csso#cloneast) and `clone` [option](https://github.com/css/csso#compressast-options) for `compress()` function (#296)
  77. - Fix parse and translate attribute selector with flags but w/o operator (i.e. `[attrName i]`)
  78. - Don't merge rules with flagged attribute selectors with others (#291)
  79. - Take in account functions when merge TRBL-properties (#297, thanks to @ArturAralin)
  80. - Improve partial merge (#304)
  81. - Tweak scanner, reduce code deoptimizations and other small improvements
  82. ## 2.1.1 (May 11, 2016)
  83. - Fix wrong declaration with `\9` hack merge (#295)
  84. ## 2.1.0 (May 8, 2016)
  85. - New option `comments` to specify what comments to left: `exclamation`, `first-exclamation` and `none`
  86. - Add `offset` to CSS parse error details
  87. - Fix token `offset` computation
  88. ## 2.0.0 (April 5, 2016)
  89. - No more `gonzales` AST format and related code
  90. - `minify()` and `minifyBlock()` is always return an object as result now (i.e. `{ css: String, map: SourceMapGenerator or null }`)
  91. - `parse()`
  92. - Returns AST in new format (so called `internal`)
  93. - Dynamic scanner implemented
  94. - New AST format + dynamic scanner = performance boost and less memory consumption
  95. - No more `context` argument, context should be specified via `options`
  96. - Supported contexts now: `stylesheet`, `atrule`, `atruleExpression`, `ruleset`, `selector`, `simpleSelector`, `block`, `declaration` and `value`
  97. - Drop `needPositions` option, `positions` option should be used instead
  98. - Drop `needInfo` option, `info` object is attaching to nodes when some information is requested by `options`
  99. - `options` should be an object, otherwise it treats as empty object
  100. - `compress()`
  101. - No more AST converting (performance boost and less memory consumption)
  102. - Drop `outputAst` option
  103. - Returns an object as result instead of AST (i.e. `{ ast: Object }`)
  104. - Drop methods: `justDoIt()`, `stringify()`, `cleanInfo()`
  105. ## 1.8.1 (March 30, 2016)
  106. - Don't remove spaces after function/braces/urls since unsafe (#289)
  107. ## 1.8.0 (March 24, 2016)
  108. - Usage data support:
  109. - Filter rulesets by tag names, class names and ids white lists.
  110. - More aggressive ruleset moving using class name scopes information.
  111. - New CLI option `--usage` to pass usage data file.
  112. - Improve initial ruleset merge
  113. - Change order of ruleset processing, now it's left to right. Previously unmerged rulesets may prevent lookup and other rulesets merge.
  114. - Difference in pseudo signature just prevents ruleset merging, but don't stop lookup.
  115. - Simplify block comparison (performance).
  116. - New method `csso.minifyBlock()` for css block compression (e.g. `style` attribute content).
  117. - Ruleset merge improvement: at-rules with block (like `@media` or `@supports`) now can be skipped during ruleset merge lookup if doesn't contain something prevents it.
  118. - FIX: Add negation (`:not()`) to pseudo signature to avoid unsafe merge (old browsers doesn't support it).
  119. - FIX: Check nested parts of value when compute compatibility. It fixes unsafe property merging.
  120. ## 1.7.1 (March 16, 2016)
  121. - pass block mode to tokenizer for correct parsing of declarations properties with `//` hack
  122. - fix wrongly `@import` and `@charset` removal on double exclamation comment
  123. ## 1.7.0 (March 10, 2016)
  124. - support for [CSS Custom Properties](https://www.w3.org/TR/css-variables/) (#279)
  125. - rework RTBL properties merge – better merge for values with special units and don't merge values with CSS-wide keywords (#255)
  126. - remove redundant universal selectors (#178)
  127. - take in account `!important` when check for property overriding (#280)
  128. - don't merge `text-align` declarations with some values (#281)
  129. - add spaces around `/deep/` combinator on translate, since it together with universal selector can produce a comment
  130. - better keyword and property name resolving (tolerant to hacks and so on)
  131. - integration improvements
  132. - compression log function could be customized by `logger` option for `compress()` and `minify()`
  133. - make possible to set initial line and column for parser
  134. ## 1.6.4 (March 1, 2016)
  135. - `npm` publish issue (#276)
  136. ## 1.6.3 (February 29, 2016)
  137. - add `file` to generated source map since other tools can relay on it in source map transform chain
  138. ## 1.6.2 (February 29, 2016)
  139. - tweak some parse error messages and their positions
  140. - fix `:not()` parsing and selector groups in `:not()` is supported now (#215)
  141. - `needPosition` parser option is deprecated, `positions` option should be used instead (`needPosition` is used still if `positions` option omitted)
  142. - expose internal AST API as `csso.internal.*`
  143. - `minify()` adds `sourcesContent` by default when source map is generated
  144. - bring back support for node.js `0.10` until major release (#275)
  145. ## 1.6.1 (February 28, 2016)
  146. - fix exception on zero length dimension compress outside declaration (#273)
  147. ## 1.6.0 (February 27, 2016)
  148. - **source maps support**
  149. - parser remake:
  150. - various parsing issues fixed
  151. - fix unicode sequence processing in ident (#191)
  152. - support for flags in attribute selector (#270)
  153. - position (line and column) of parse error (#109)
  154. - 4x performance boost, less memory consumption
  155. - compressor refactoring
  156. - internal AST is using doubly linked lists (with safe transformation support during iteration) instead of arrays
  157. - rename `restructuring` to `restructure` option for `minify()`/`compress()` (`restructuring` is alias for `restructure` now, with lower priority)
  158. - unquote urls when possible (#141, #60)
  159. - setup code coverage and a number of related fixes
  160. - add eslint to check unused things
  161. ## 1.5.4 (January 27, 2016)
  162. - one more fix (in `restructRuleset` this time) with merge of rulesets when a ruleset with same specificity places between them (#264)
  163. - disable partial merge of rulesets in `@keyframes` rulesets (until sure it's correct)
  164. ## 1.5.3 (January 25, 2016)
  165. - don't override display values with different browser support (#259)
  166. - fix publish issue (one of modules leak in development state)
  167. ## 1.5.2 (January 24, 2016)
  168. - don't merge rulesets if between them a ruleset with same specificity (#264)
  169. ## 1.5.1 (January 14, 2016)
  170. - ensure `-` is not used as an identifier in attribute selectors (thanks to @mathiasbynens)
  171. - fix broken `justDoIt()` function
  172. - various small fixes
  173. ## 1.5.0 (January 14, 2016)
  174. ### Parser
  175. - attach minus to number
  176. ### Compressor
  177. - split code base into small modules and related refactoring
  178. - introduce internal AST format for compressor (`gonzales`→`internal` and `internal`→`gonzales` convertors, walkers, translator)
  179. - various optimizations: no snapshots, using caches and indexes
  180. - sort selectors, merge selectors in alphabet order
  181. - compute selector's specificity
  182. - better ruleset restructuring, improve compression of partially equal blocks
  183. - better ruleset merge – not only closest but also disjoined by other rulesets when safe
  184. - join `@media` with same query
  185. - `outputAst` – new option to specify output AST format (`gonzales` by default for backward compatibility)
  186. - remove quotes surrounding attribute values in attribute selectors when possible (#73)
  187. - replace `from`→`0%` and `100%`→`to` at `@keyframes` (#205)
  188. - prevent partial merge of rulesets at `@keyframes` (#80, #197)
  189. ### API
  190. - walker for `gonzales` AST was implemented
  191. ### CLI
  192. - new option `--stat` (output stat in `stderr`)
  193. - new optional parameter `level` for `--debug` option
  194. ## 1.4.4 (December 10, 2015)
  195. - prevent removal of spaces after braces that before identifier that breaking at-rules expressions (#258)
  196. ## 1.4.3 (December 4, 2015)
  197. - fix unicode-range parsing that cause to wrong function detection (#250)
  198. ## 1.4.2 (November 9, 2015)
  199. - allow spaces between `progid:` and rest part of value for IE's `filter` property as `autoprefixer` generates this kind of code (#249)
  200. - fixes for Windows:
  201. - correct processing new lines
  202. - normalize file content in test suite
  203. - fixes to work in strict mode (#252)
  204. - init compressor dictionaries for every css block (#248, #251)
  205. - bump uglify-js version
  206. ## 1.4.1 (October 20, 2015)
  207. - allow merge for `display` property (#167, #244)
  208. - more accurate `rect` (`clip` property value) merge
  209. - fix typo when specifying options in cli (thanks to @Taritsyn)
  210. - fix safe unit values merge with keyword values (#244)
  211. - fix wrong descendant combinator removal (#246)
  212. - build browser version on `prepublish` (thanks to @silentroach)
  213. - parser: store whitespaces as single token (performance and reduce memory consumption)
  214. - rearrange compress tests layout
  215. ## 1.4 (October 16, 2015)
  216. Bringing project back to life. Changed files structure, cleaned up and refactored most of sources.
  217. ### Common
  218. - single code base (no more `src` folder)
  219. - build browser version with `browserify` (no more `make`, and `web` folder), browser version is available at `dist/csso-browser.js`
  220. - main file is `lib/index.js` now
  221. - minimal `node.js` version is `0.12` now
  222. - restrict file list to publish on npm (no more useless folders and files in package)
  223. - add `jscs` to control code style
  224. - automate `gh-pages` update
  225. - util functions reworked
  226. - translator reworked
  227. - test suite reworked
  228. - compressor refactored
  229. - initial parser refactoring
  230. ### API
  231. - new method `minify(src, options)`, options:
  232. - `restructuring` – if set to `false`, disable structure optimisations (`true` by default)
  233. - `debug` - outputs intermediate state of CSS during compression (`false` by default)
  234. - deprecate `justDoIt()` method (use `minify` instead)
  235. - rename `treeToString()` method to `stringify()`
  236. - drop `printTree()` method
  237. - AST node info
  238. - `column` and `offset` added
  239. - `ln` renamed to `line`
  240. - fix line counting across multiple files and input with CR LF (#147)
  241. ### CLI
  242. - completely reworked, use [clap](https://github.com/lahmatiy/clap) to parse argv
  243. - add support for input from stdin (#128)
  244. - drop undocumented and obsoleted options `--rule` and `--parser` (suppose nobody use it)
  245. - drop `-off` alias for `--restructure-off` as incorrect (only one letter options should starts with single `-`)
  246. - new option `--debug` that reflecting to `options.debug` for `minify`
  247. ### Parsing and optimizations
  248. - keep all exclamation comments (#194)
  249. - add `/deep/` combinator support (#209)
  250. - attribute selector
  251. - allow colon in attribute name (#237)
  252. - support for namespaces (#233)
  253. - color
  254. - support all css/html colors
  255. - convert `hsla` to `rgba` and `hls` to `rgb`
  256. - convert `rgba` with 1 as alpha value to `rgb` (#122)
  257. - interpolate `rgb` and `rgba` percentage values to absolute values
  258. - replace percentage values in `rgba` for normalized/interpolated values
  259. - lowercase hex colors and color names (#169)
  260. - fix color minification when hex value replaced for color name (#176)
  261. - fit rgb values to 0..255 range (#181)
  262. - calc
  263. - remove spaces for multiple operator in calc
  264. - don't remove units inside calc (#222)
  265. - fix wrong white space removal around `+` and `-` (#228)
  266. - don't remove units in `flex` property as it could change value meaning (#200)
  267. - don't merge `\9` hack values (#231)
  268. - merge property values only if they have the same functions (#150, #227)
  269. - don't merge property values with some sort of units (#140, #161)
  270. - fix `!important` issue for `top-right-bottom-left` properties (#189)
  271. - fix `top-right-bottom-left` properties merge (#139, #175)
  272. - support for unicode-range (#148)
  273. - don't crash on ruleset with no selector (#135)
  274. - tolerant to class names that starts with digit (#99, #105)
  275. - fix background compressing (#170)
  276. ## 1.3.12 (October 8, 2015)
  277. - Case insensitive check for `!important` (#187)
  278. - Fix problems with using `csso` as cli command on Windows (#83, #136, #142 and others)
  279. - Remove byte order marker (the UTF-8 BOM) from input
  280. - Don't strip space between funktion-funktion and funktion-vhash (#134)
  281. - Don't merge TRBL values having \9 (hack for IE8 in bootstrap) (#159, #214, #230, #231 and others)
  282. - Don't strip units off dimensions of non-length (#226, #229 and others)
  283. ## 1.3.7 (February 11, 2013)
  284. - Gonzales 1.0.7.
  285. ## 1.3.6 (November 26, 2012)
  286. - Gonzales 1.0.6.
  287. ## 1.3.5 (October 28, 2012)
  288. - Gonzales 1.0.5.
  289. - Protecting copyright notices in CSS: https://github.com/css/csso/issues/92
  290. - Zero CSS throws an error: https://github.com/css/csso/issues/96
  291. - Don't minify the second `0s` in Firefox for animations: https://github.com/css/csso/issues/100
  292. - Japan manual
  293. - BEM ready documentation
  294. ## 1.3.4 (October 10, 2012)
  295. - @page inside @media Causes Error: https://github.com/css/csso/issues/90
  296. ## 1.3.3 (October 9, 2012)
  297. - CSSO 1.3.2 compresses ".t-1" and ".t-01" as identical classes: https://github.com/css/csso/issues/88
  298. ## 1.3.2 (October 8, 2012)
  299. - filter + important breaks CSSO v1.3.1: https://github.com/css/csso/issues/87
  300. ## 1.3.1 (October 8, 2012)
  301. - "filter" IE property breaks CSSO v1.3.0: https://github.com/css/csso/issues/86
  302. ## 1.3.0 (October 4, 2012)
  303. - PeCode CSS parser replaced by Gonzales CSS parser