postcss-combine-duplicated-selectors

automatically keep css selectors unique.

MIT License

Downloads
361.9K
Stars
95
Committers
13

Bot releases are visible (Hide)

postcss-combine-duplicated-selectors - Latest Release

Published by ChristianMurphy over 3 years ago

Update badges in readme, update dev dependencies

postcss-combine-duplicated-selectors -

Published by ChristianMurphy about 4 years ago

Correct typings to do commonjs style export.
Previously typings incorrectly included a default export, which is only supported if esModuleInterop is enabled.

postcss-combine-duplicated-selectors -

Published by ChristianMurphy about 4 years ago

updates documentation comments for typescript typings

postcss-combine-duplicated-selectors - Re-release 9.1.0

Published by ChristianMurphy about 4 years ago

9.2.0 and 9.3.0 unintentionally included potentially breaking changes, this re-releases 9.1.0 as 9.4.0 to minimize impact to adopters using a minor (^9) version range in their package.json.

postcss-combine-duplicated-selectors - Postcss 8 and TypeScript typings

Published by ChristianMurphy about 4 years ago

Breaking changes:

  • postcss 8 is now required
  • postcss is now a peer dependency, run npm install postcss or yarn add postcss to ensure it is in your project
  • TypeScript typings are now provided, these typings build in postcss's own typings and require TypeScript 4 or higher

postcss-combine-duplicated-selectors now leverages the postcss single scan visitor API.
This has a few implications:

  • With new API, all plugins can share a single scan of the CSS tree. It makes CSS processing up to 20% faster.
  • Plugins will re-visit changed nodes to reduce compatibility issues between plugins. Now the order of plugins in your PostCSS config will be less important.

source: https://github.com/postcss/postcss/releases/tag/8.0.0

postcss-combine-duplicated-selectors - Leverage single scan visitor API

Published by ChristianMurphy about 4 years ago

⚠️ this release unintentionally contains breaking changes, please upgrade directly to version 10, or hold at versio 9.1.0 if that is not possible ⚠️


postcss-combine-duplicated-selectors now leverages the postcss single scan visitor API.
This has a few implications:

  • With new API, all plugins can share a single scan of the CSS tree. It makes CSS processing up to 20% faster.
  • Plugins will re-visit changed nodes to reduce compatibility issues between plugins. Now the order of plugins in your PostCSS config will be less important.

source: https://github.com/postcss/postcss/releases/tag/8.0.0

For more information on the new tree walking API see: https://evilmartians.com/chronicles/postcss-8-plugin-migration#step-3-take-the-most-out-of-the-new-api and https://github.com/postcss/postcss/releases/tag/8.0.0

postcss-combine-duplicated-selectors - Support postcss 8.1.0

Published by ChristianMurphy about 4 years ago

⚠️ this release unintentionally contains breaking changes, please upgrade directly to version 10, or hold at versio 9.1.0 if that is not possible ⚠️


postcss 8.1.0 renamed the visitor postcss-combine-duplicated-selectors depends on (Root to Once).
This release updates to the new visitor, and requires postcss 8.1.0 and above.

Note: postcss is now a peer dependency if it is not directly installed already, please run npm install postcss

postcss-combine-duplicated-selectors - Support keeping fallback values

Published by ChristianMurphy about 4 years ago

A new option removeDuplicatedValues has been added. (#534 thanks @MoltenCoffee)


In order to limit this to only combining properties when the values are equal, set the removeDuplicatedValues option to true instead. This could clean up duplicated properties, but allow for conscious duplicates such as fallbacks for custom properties.

const postcss = require('postcss');
const combineSelectors = require('postcss-combine-duplicated-selectors');

postcss([combineSelectors({removeDuplicatedValues: true})]);

This will transform the following css

.a {
  height: 10px;
}

.a {
  width: 20px;
  background: var(--custom-color);
  background: rgba(255, 165, 0, 0.5);
}

into

.a {
  height: 10px;
  width: 20px;
  background: var(--custom-color);
  background: rgba(255, 165, 0, 0.5);
}
postcss-combine-duplicated-selectors - Drop Official Node 8 support, add Node 14 support

Published by ChristianMurphy over 4 years ago

Node 8 may still work, but it is no longer a part of the CI tests and is not officially supported.
Node 14 is now officially supported.

postcss-combine-duplicated-selectors - Selector Parser Version 6

Published by ChristianMurphy over 5 years ago

postcss-combine-duplicated-selectors - Selector Parser v5

Published by ChristianMurphy almost 6 years ago

postcss-combine-duplicated-selectors - Handle Selector groups

Published by ChristianMurphy about 6 years ago

Groups of css selectors that are logically the same will now be combined (#247 thanks @r-wettstaedt!)

.one .two, .one .three {} .one .three, .one .two {}
/* becomes */
.one .two, .one .three {}
postcss-combine-duplicated-selectors - Postcss 7

Published by ChristianMurphy over 6 years ago

Remove Node.js 9 and Node.js 4 support
Remove IE and “dead” browsers support

https://github.com/postcss/postcss/blob/master/CHANGELOG.md#70-president-amy

postcss-combine-duplicated-selectors - Postcss Selector Parser 4

Published by ChristianMurphy over 6 years ago

postcss-combine-duplicated-selectors - Update CLI usage documentation

Published by ChristianMurphy over 6 years ago

Documentation has been updated to reflect new PostCSS command line usage. (#148 thanks to @ItsEddie)

postcss-combine-duplicated-selectors - nested @font-face changes

Published by ChristianMurphy almost 7 years ago

When using postcss-combine-duplicated-selectors with postcss-nested selectors, @font-face now bubbles to the top level, changing how selectors will be combined.
See: https://github.com/postcss/postcss-nested/blob/master/CHANGELOG.md#30

postcss-combine-duplicated-selectors - Upgrade commit message checker

Published by ChristianMurphy almost 7 years ago

postcss-combine-duplicated-selectors - Upgrade testing libraries

Published by ChristianMurphy almost 7 years ago

postcss-combine-duplicated-selectors - Upgrade postcss selector parser

Published by ChristianMurphy almost 7 years ago

No new features in postcss-combine-duplicated-selectors, just improvements in the underlying technology.

postcss-combine-duplicated-selectors - Re-add Node 6 Support

Published by ChristianMurphy about 7 years ago

Explicit Node.js version 6 support has been re-added to package.json engines