| 1 | # Changes to PostCSS Custom Properties
|
|---|
| 2 |
|
|---|
| 3 | ### 12.1.11 (December 1, 2022)
|
|---|
| 4 |
|
|---|
| 5 | - Improve plugin performance
|
|---|
| 6 |
|
|---|
| 7 | ### 12.1.10 (October 20, 2022)
|
|---|
| 8 |
|
|---|
| 9 | - Fix how `preserve: false` interacts with logic around duplicate code (see `12.1.9`).
|
|---|
| 10 |
|
|---|
| 11 | ```diff
|
|---|
| 12 | :root {
|
|---|
| 13 | --my-order: 1;
|
|---|
| 14 | }
|
|---|
| 15 |
|
|---|
| 16 | .foo {
|
|---|
| 17 | order: 1;
|
|---|
| 18 | order: var(--my-order);
|
|---|
| 19 | }
|
|---|
| 20 |
|
|---|
| 21 | /* With `preserve: false` : */
|
|---|
| 22 |
|
|---|
| 23 | .foo {
|
|---|
| 24 | order: 1;
|
|---|
| 25 | }
|
|---|
| 26 | ```
|
|---|
| 27 |
|
|---|
| 28 | ### 12.1.9 (September 14, 2022)
|
|---|
| 29 |
|
|---|
| 30 | - Prevent duplicate code generation.
|
|---|
| 31 |
|
|---|
| 32 | ```diff
|
|---|
| 33 | .foo {
|
|---|
| 34 | order: 1;
|
|---|
| 35 | order: var(--my-order, 1);
|
|---|
| 36 | }
|
|---|
| 37 |
|
|---|
| 38 | /* becomes */
|
|---|
| 39 |
|
|---|
| 40 | .foo {
|
|---|
| 41 | order: 1;
|
|---|
| 42 | - order: 1;
|
|---|
| 43 | order: var(--my-order, 1);
|
|---|
| 44 | }
|
|---|
| 45 | ```
|
|---|
| 46 |
|
|---|
| 47 | ### 12.1.8 (June 10, 2022)
|
|---|
| 48 |
|
|---|
| 49 | - Remove some unneeded regular expressions.
|
|---|
| 50 |
|
|---|
| 51 | ### 12.1.7 (April 8, 2022)
|
|---|
| 52 |
|
|---|
| 53 | - Fix racing condition that could happen when using other async PostCSS plugins ([#331](https://github.com/csstools/postcss-plugins/issues/331))
|
|---|
| 54 |
|
|---|
| 55 | ### 12.1.6 (April 5, 2022)
|
|---|
| 56 |
|
|---|
| 57 | - Fix `var()` fallback value downgrades with value lists.
|
|---|
| 58 |
|
|---|
| 59 | ### 12.1.5 (March 19, 2022)
|
|---|
| 60 |
|
|---|
| 61 | - Add deprecation notice for `importFrom` and `exportTo`
|
|---|
| 62 |
|
|---|
| 63 | [see the discussion](https://github.com/csstools/postcss-plugins/discussions/192)
|
|---|
| 64 |
|
|---|
| 65 | ### 12.1.4 (January 31, 2022)
|
|---|
| 66 |
|
|---|
| 67 | - Fix `.mjs` in `importFrom` when using `export default`
|
|---|
| 68 | - Fix `.mjs` in `importFrom` on Windows
|
|---|
| 69 |
|
|---|
| 70 | ### 12.1.3 (January 17, 2022)
|
|---|
| 71 |
|
|---|
| 72 | - Reset plugin state after each process. It is now safe to use the plugin multiple times for different processes or when watching.
|
|---|
| 73 |
|
|---|
| 74 | ### 12.1.2 (January 12, 2022)
|
|---|
| 75 |
|
|---|
| 76 | - Fix TypeScript transpilation.
|
|---|
| 77 | - Avoid throwing errors on unexpected option objects.
|
|---|
| 78 |
|
|---|
| 79 | ### 12.1.1 (January 12, 2022)
|
|---|
| 80 |
|
|---|
| 81 | - Fix Node 12/14 compatibility
|
|---|
| 82 |
|
|---|
| 83 | ### 12.1.0 (January 12, 2022)
|
|---|
| 84 |
|
|---|
| 85 | - Add `overrideImportFromWithRoot` option
|
|---|
| 86 | - Allow `.mjs` in `importFrom`
|
|---|
| 87 | - Converted to typescript
|
|---|
| 88 | - Correct typings for plugin options
|
|---|
| 89 | - Fix unicode support in custom property names
|
|---|
| 90 |
|
|---|
| 91 | ### 12.0.4 (January 7, 2022)
|
|---|
| 92 |
|
|---|
| 93 | - Fixed an issue that was causing synchronous mode to not being able to pick and transform properties that were added as part of the PostCSS flow. ([#132](https://github.com/csstools/postcss-plugins/issues/132))
|
|---|
| 94 |
|
|---|
| 95 | ### 12.0.2 (January 2, 2022)
|
|---|
| 96 |
|
|---|
| 97 | - Removed Sourcemaps from package tarball.
|
|---|
| 98 | - Moved CLI to CLI Package. See [announcement](https://github.com/csstools/postcss-plugins/discussions/121).
|
|---|
| 99 |
|
|---|
| 100 | ### 12.0.1 (December 16, 2021)
|
|---|
| 101 |
|
|---|
| 102 | - Changed: now uses `postcss-value-parser` for parsing.
|
|---|
| 103 | - Updated: documentation
|
|---|
| 104 |
|
|---|
| 105 | ### 12.0.0 (September 17, 2021)
|
|---|
| 106 |
|
|---|
| 107 | - Updated: Support for PostCS 8+ (major).
|
|---|
| 108 | - Updated: Support for Node 12+ (major).
|
|---|
| 109 |
|
|---|
| 110 | ### 11.0.0 (January 12, 2021)
|
|---|
| 111 |
|
|---|
| 112 | - Added: Support for PostCSS v8.
|
|---|
| 113 |
|
|---|
| 114 | ### 10.0.0 (September 18, 2020)
|
|---|
| 115 |
|
|---|
| 116 | - Fixed: `url-regex` vulnerability ([#228](https://github.com/postcss/postcss-custom-properties/pull/228))
|
|---|
| 117 | - Breaking Change: Node v10+ now required
|
|---|
| 118 |
|
|---|
| 119 | ### 9.2.0 (September 18, 2020)
|
|---|
| 120 |
|
|---|
| 121 | - Added: Export variables to SCSS file ([#212](https://github.com/postcss/postcss-custom-properties/pull/212))
|
|---|
| 122 | - Added: Support for ".pcss" file resolution in `importFrom` ([#211](https://github.com/postcss/postcss-custom-properties/pull/211))
|
|---|
| 123 | - Fixed: Allow combined selectors ([#199](https://github.com/postcss/postcss-custom-properties/pull/199))
|
|---|
| 124 | - Fixed: Bug with spaces and commas in value ([#222](https://github.com/postcss/postcss-custom-properties/pull/222))
|
|---|
| 125 | - Fixed: `importFrom` priority ([#222](https://github.com/postcss/postcss-custom-properties/pull/222))
|
|---|
| 126 |
|
|---|
| 127 | ### 9.1.1 (February 20, 2020)
|
|---|
| 128 |
|
|---|
| 129 | - Fixed: Preserve spaces in multi-part values ([#203](https://github.com/postcss/postcss-custom-properties/pull/203))
|
|---|
| 130 |
|
|---|
| 131 | ### 9.1.0 (July 15, 2019)
|
|---|
| 132 |
|
|---|
| 133 | - Added: Support for preserving trailing comments within a declaration.
|
|---|
| 134 |
|
|---|
| 135 | ### 9.0.2 (July 15, 2019)
|
|---|
| 136 |
|
|---|
| 137 | - Updated: `postcss-values-parser` to 3.0.5 (patch)
|
|---|
| 138 |
|
|---|
| 139 | ### 9.0.1 (June 20, 2019)
|
|---|
| 140 |
|
|---|
| 141 | - Updated: `postcss-values-parser` to 3.0.4 (major)
|
|---|
| 142 | - Updated: Node 8+ compatibility (major)
|
|---|
| 143 |
|
|---|
| 144 | > This release is identical to v9.0.0, only `npm publish` failed to publish v9.0.0 and threw the following error:
|
|---|
| 145 | > ```
|
|---|
| 146 | > You cannot publish over the previously published versions: 9.0.0.
|
|---|
| 147 | > ```
|
|---|
| 148 | > I did not want this issue to distract me, and so I thoughtfully and impatiently published v9.0.0 as v9.0.1.
|
|---|
| 149 |
|
|---|
| 150 | ### 8.0.11 (June 20, 2019)
|
|---|
| 151 |
|
|---|
| 152 | - Added: Synchronous transforms when async is unnecessary (thank @eteeselink)
|
|---|
| 153 | - Fixed: Unexpected mutations to imported Custom Properties (thank @EECOLOR)
|
|---|
| 154 | - Fixed: Transforms throwing over unknown Custom Properties
|
|---|
| 155 |
|
|---|
| 156 | ### 8.0.10 (April 1, 2019)
|
|---|
| 157 |
|
|---|
| 158 | - Added: Support for ignoring lines and or blocks using
|
|---|
| 159 | `postcss-custom-properties` comments.
|
|---|
| 160 | - Updated: `postcss` to 7.0.14 (patch)
|
|---|
| 161 | - Updated: `postcss-values-parser` to 2.0.1 (patch)
|
|---|
| 162 |
|
|---|
| 163 | ### 8.0.9 (November 5, 2018)
|
|---|
| 164 |
|
|---|
| 165 | - Fixed: Issue with duplicate custom property usage within a declaration
|
|---|
| 166 |
|
|---|
| 167 | ### 8.0.8 (October 2, 2018)
|
|---|
| 168 |
|
|---|
| 169 | - Fixed: Issue with nested fallbacks
|
|---|
| 170 |
|
|---|
| 171 | ### 8.0.7 (October 2, 2018)
|
|---|
| 172 |
|
|---|
| 173 | - Fixed: Issue with parsing custom properties that are not strings
|
|---|
| 174 | - Updated: `postcss` to 7.0.5 (patch)
|
|---|
| 175 |
|
|---|
| 176 | ### 8.0.6 (September 21, 2018)
|
|---|
| 177 |
|
|---|
| 178 | - Fixed: Issue with regular `:root` and `html` properties not getting polyfilled
|
|---|
| 179 | - Updated: `postcss` to 7.0.3 (patch)
|
|---|
| 180 |
|
|---|
| 181 | ### 8.0.5 (September 21, 2018)
|
|---|
| 182 |
|
|---|
| 183 | - Fixed: Issue with multiple `importFrom` not getting combined
|
|---|
| 184 |
|
|---|
| 185 | ### 8.0.4 (September 18, 2018)
|
|---|
| 186 |
|
|---|
| 187 | - Fixed: Do not break on an empty `importFrom` object
|
|---|
| 188 |
|
|---|
| 189 | ### 8.0.3 (September 18, 2018)
|
|---|
| 190 |
|
|---|
| 191 | - Updated: PostCSS Values Parser 2
|
|---|
| 192 |
|
|---|
| 193 | ### 8.0.2 (September 17, 2018)
|
|---|
| 194 |
|
|---|
| 195 | - Fixed: Spacing is preserved before replaced variables.
|
|---|
| 196 |
|
|---|
| 197 | ### 8.0.1 (September 17, 2018)
|
|---|
| 198 |
|
|---|
| 199 | - Fixed: Workaround issue in `postcss-values-parser` incorrectly cloning nodes.
|
|---|
| 200 |
|
|---|
| 201 | ### 8.0.0 (September 16, 2018)
|
|---|
| 202 |
|
|---|
| 203 | - Added: New `exportTo` function to specify where to export custom properties to.
|
|---|
| 204 | - Added: New `importFrom` option to specify where to import custom properties from.
|
|---|
| 205 | - Added: Support for variables written within `html`
|
|---|
| 206 | - Added: Support for PostCSS v7.
|
|---|
| 207 | - Added: Support for Node v6+.
|
|---|
| 208 | - Removed: `strict` option, as using the fallback value isn’t necessarily more valid.
|
|---|
| 209 | - Removed: `preserve: "computed"` option, as there seems to be little use in preserving custom property declarations while removing all usages of them.
|
|---|
| 210 | - Removed: `warnings` and `noValueNotifications` options, as this should be the job of a linter tool.
|
|---|
| 211 | - Removed: `variables` option, which is now replaced by `importFrom`
|
|---|
| 212 | - Removed: `appendVariables` option, which is now replaced by `exportTo`
|
|---|
| 213 | - Fixed: Custom Properties in `:root` are not also transformed.
|
|---|
| 214 | - Fixed: Declarations that do not change are not duplicated during preserve.
|
|---|
| 215 |
|
|---|
| 216 | ### 7.0.0 (February 16, 2018)
|
|---|
| 217 |
|
|---|
| 218 | - Changed: `preserve` option defaults as `true` to reflect the browser climate
|
|---|
| 219 | - Changed: `warnings` option defaults to `false` to reflect the browser climate
|
|---|
| 220 |
|
|---|
| 221 | ### 6.3.1 (February 16, 2018)
|
|---|
| 222 |
|
|---|
| 223 | - Reverted: `preserve` and `warnings` option to be added in major release
|
|---|
| 224 |
|
|---|
| 225 | ### 6.3.0 (February 15, 2018)
|
|---|
| 226 |
|
|---|
| 227 | - Fixed: `var()` captures strictly `var()` functions and not `xvar()`, etc
|
|---|
| 228 | - Fixed: `var()` better captures whitespace within the function
|
|---|
| 229 | - Fixed: comments within declarations using `var()` are now preserved
|
|---|
| 230 | - Changed: `preserve` option defaults as `true` to reflect the browser climate
|
|---|
| 231 | - Changed: `warnings` option defaults to `false` to reflect the browser climate
|
|---|
| 232 | - Updated documentation
|
|---|
| 233 |
|
|---|
| 234 | ### 6.2.0 (October 6, 2017)
|
|---|
| 235 |
|
|---|
| 236 | - Added: `noValueNotifications` option (#71)
|
|---|
| 237 | - Fixed: Typo in `prefixedVariables` variable name (#77)
|
|---|
| 238 |
|
|---|
| 239 | ### 6.1.0 (June 28, 2017)
|
|---|
| 240 |
|
|---|
| 241 | - Added: Let "warnings" option silence all warnings
|
|---|
| 242 | ([#67](https://github.com/postcss/postcss-custom-properties/pull/67))
|
|---|
| 243 | - Dependencies update (postcss, balanced-match)
|
|---|
| 244 |
|
|---|
| 245 | ### 6.0.1 (May 15, 2017)
|
|---|
| 246 |
|
|---|
| 247 | - Fixed: incorrect export ([#69](https://github.com/postcss/postcss-custom-properties/issues/69))
|
|---|
| 248 |
|
|---|
| 249 | ### 6.0.0 (May 12, 2017)
|
|---|
| 250 |
|
|---|
| 251 | - Added: compatibility with postcss v6.x
|
|---|
| 252 |
|
|---|
| 253 | ### 5.0.2 (February 1, 2017)
|
|---|
| 254 |
|
|---|
| 255 | - Minor dependency update
|
|---|
| 256 | ([#57](https://github.com/postcss/postcss-custom-properties/pull/57))
|
|---|
| 257 |
|
|---|
| 258 | ### 5.0.1 (April 22, 2016)
|
|---|
| 259 |
|
|---|
| 260 | - Fixed: trailing space after custom property name causes duplicate empty
|
|---|
| 261 | property
|
|---|
| 262 | ([#43](https://github.com/postcss/postcss-custom-properties/pull/43))
|
|---|
| 263 |
|
|---|
| 264 | ### 5.0.0 (August 25, 2015)
|
|---|
| 265 |
|
|---|
| 266 | - Removed: compatibility with postcss v4.x
|
|---|
| 267 | - Added: compatibility with postcss v5.x
|
|---|
| 268 |
|
|---|
| 269 | ### 4.2.0 (July 21, 2015)
|
|---|
| 270 |
|
|---|
| 271 | - Added: `warnings` option allows you to disable warnings.
|
|---|
| 272 | ([cssnext#186](https://github.com/cssnext/cssnext/issues/186))
|
|---|
| 273 |
|
|---|
| 274 | ### 4.1.0 (July 14, 2015)
|
|---|
| 275 |
|
|---|
| 276 | - Added: plugin now returns itself in order to expose a `setVariables` function
|
|---|
| 277 | that allow you to programmatically change the variables.
|
|---|
| 278 | ([#35](https://github.com/postcss/postcss-custom-properties/pull/35))
|
|---|
| 279 |
|
|---|
| 280 | ### 4.0.0 (June 17, 2015)
|
|---|
| 281 |
|
|---|
| 282 | - Changed: messages and exceptions are now sent using postcss message API.
|
|---|
| 283 |
|
|---|
| 284 | ### 3.3.0 (April 8, 2015)
|
|---|
| 285 |
|
|---|
| 286 | - Added: `preserve` now support `"computed"` so only preserve resolved custom properties (see new option below)
|
|---|
| 287 | - Added: `appendVariables` allows you (when `preserve` is truthy) to append your variables as custom properties
|
|---|
| 288 | - Added: `strict: false` allows your to avoid too many fallbacks added in your CSS.
|
|---|
| 289 |
|
|---|
| 290 | ### 3.2.0 (03 31, 2015)
|
|---|
| 291 |
|
|---|
| 292 | - Added: JS defined variables are now resolved too ([#22](https://github.com/postcss/postcss-custom-properties/issues/22))
|
|---|
| 293 |
|
|---|
| 294 | ### 3.1.0 (03 16, 2015)
|
|---|
| 295 |
|
|---|
| 296 | - Added: variables defined in JS are now automatically prefixed with `--`
|
|---|
| 297 | ([0691784](https://github.com/postcss/postcss-custom-properties/commit/0691784ed2218d7e6b16da8c4df03e2ca0c4798c))
|
|---|
| 298 |
|
|---|
| 299 | ### 3.0.1 (February 6, 2015)
|
|---|
| 300 |
|
|---|
| 301 | - Fixed: logs now have filename back ([#19](https://github.com/postcss/postcss-custom-properties/issues/19))
|
|---|
| 302 |
|
|---|
| 303 | ### 3.0.0 (January 20, 2015)
|
|---|
| 304 |
|
|---|
| 305 | - Changed: upgrade to postcss 4 ([#18](https://github.com/postcss/postcss-custom-properties/pull/18))
|
|---|
| 306 | - Removed: some code that seems to be useless ([16ff3c2](https://github.com/postcss/postcss-custom-properties/commit/16ff3c22fe0563a1283411d7866791966fff4c58))
|
|---|
| 307 |
|
|---|
| 308 | ### 2.1.1 (December 2, 2014)
|
|---|
| 309 |
|
|---|
| 310 | - Fixed: issue when multiples undefined custom properties are referenced ([#16](https://github.com/postcss/postcss-custom-properties/issues/16))
|
|---|
| 311 |
|
|---|
| 312 | ### 2.1.0 (November 25, 2014)
|
|---|
| 313 |
|
|---|
| 314 | - Added: enhanced exceptions & messages
|
|---|
| 315 |
|
|---|
| 316 | ### 2.0.0 (November 12, 2014)
|
|---|
| 317 |
|
|---|
| 318 | - Changed: upgrade to postcss 3
|
|---|
| 319 |
|
|---|
| 320 | ### 1.0.2 (November 4, 2014)
|
|---|
| 321 |
|
|---|
| 322 | - Fixed: more clear message for warning about custom prop used in non top-level :root
|
|---|
| 323 |
|
|---|
| 324 | ### 1.0.1 (November 3, 2014)
|
|---|
| 325 |
|
|---|
| 326 | - Fixed: warning about custom prop used in non :root
|
|---|
| 327 |
|
|---|
| 328 | ### 1.0.0 (November 2, 2014)
|
|---|
| 329 |
|
|---|
| 330 | - Added: warning when a custom prop is used in another place than :root
|
|---|
| 331 | - Added: handle !important
|
|---|
| 332 |
|
|---|
| 333 | ### 0.4.0 (September 30, 2014)
|
|---|
| 334 |
|
|---|
| 335 | - Added: JS-defined properties override CSS-defined
|
|---|
| 336 |
|
|---|
| 337 | ### 0.3.1 (August 27, 2014)
|
|---|
| 338 |
|
|---|
| 339 | - Added: nested custom properties usages are now correctly resolved
|
|---|
| 340 | - Changed: undefined var doesn't throw error anymore (just a console warning) & are kept as is in the output
|
|---|
| 341 |
|
|---|
| 342 | ### 0.3.0 (August 26, 2014)
|
|---|
| 343 |
|
|---|
| 344 | - Changed: fallback now are always added by default ([see why](http://www.w3.org/TR/css-variables/#invalid-variables))
|
|---|
| 345 | - Changed: `map` option renamed to `variables`
|
|---|
| 346 |
|
|---|
| 347 | ### 0.2.0 (August 22, 2014)
|
|---|
| 348 |
|
|---|
| 349 | - Added: `map` option
|
|---|
| 350 | - Changed: GNU style error message
|
|---|
| 351 |
|
|---|
| 352 | ### 0.1.0 (August 1, 2014)
|
|---|
| 353 |
|
|---|
| 354 | ✨ First release based on [rework-vars](https://github.com/reworkcss/rework-vars) v3.1.1
|
|---|