- Updated: Support for Node
20.19.0or later (major). - Removed:
commonjsAPI. In supported Node versionsrequire(esm)will work without needing to make code changes.
August 3, 2024
- Updated: Support for Node v18+ (major).
December 15, 2023
- Fix type definitions
July 8, 2022
@csstools/css-has-pseudo-experimentalis no longer supported. Please usecss-has-pseudoinstead. All issues have been resolved in the main plugin and the experimental plugin is no longer maintained.
Caution
This experimental plugin no longer has any effect on the output of your CSS.
June 4, 2022
- Update
@csstools/selector-specificity(major)
April 29, 2022
- Use
@csstools/selector-specificityfor specificity calculations. - Update
querySelector(:has())polyfill, ensuring temporary html attributes are correctly removed. - Improve documentation
April 24, 2022
- Rules within
@supportsselector check for:haswon't be transformed. This respects stylesheet author of making the selector conditional:
@supports selector(:has(:focus)) {
/* Won't be transformed */
:has(:focus) {}
}April 5, 2022
- Update
querySelector(:has())polyfill, disallowing nested:has(:has(.foo, :has(.bar)))
April 4, 2022
- Improving selector specificity calculation.
February 24, 2022
- Use base36 encoding to fix support for upper case characters in selectors.
February 6, 2022
- Do not leak visitedness via
:haspseudo-class.
January 12, 2022
- Added : documentation and tests for CORS.
- Added : documentation for selector specificity.
- Added : typescript support.
- Changed :
doesNotExistNameplugin option has been renamed tospecificityMatchingName. - Updated : documentation for plugin and polyfill options.
- Removed : old locations of the browser polyfill in the published package.
postcss([
- cssHasPseudoExperimental({ doesNotExistName: 'something-random' })
+ cssHasPseudoExperimental({ specificityMatchingName: 'something-random' })
]).process(YOUR_CSS /*, processOptions */);January 7, 2022
- Improved : selector specificity calculation
January 5, 2022
- Added : support for id and tag selector specificity.
- Changed : hover tracking now also uses
leaveevents for correct style re-calcs.
January 4, 2022
Tracking initial implementation of :has() pseudo-class in Safari Technology Preview.
This is a breaking change and affects both the generated CSS and the client side polyfill.
- Added : 'hover' options for browser polyfill
- Added : 'observedAttributes' options for browser polyfill
- Added : 'forcePolyfill' options for browser polyfill
- Changed : selector encoding (this requires you to re-run your build steps for your CSS)
Improved support for :
- hover styles through the 'hover' option. (
label:has(~ input:hover)) - more complex selectors. (
figure:has(> figcaption) img)