Skip to content

Conversation

@romainmenke
Copy link
Member

@romainmenke romainmenke commented Jan 20, 2022

  • fixes failures in IE/Edge with <area href> see : web-tests
  • fixes :not(:any-link)
  • uses :is pseudo to reduce plugin complexity

  • document that :is will be used and link to that plugin in README.md
  • changelog
  • update preset-env to toggle the settings
  • update preset-env tests

Decided against using :is as we have seen in the past that making another plugin required leads to frustrations with users. (see logical and :dir)

Making the plugin just work even if we have some code duplication is preferable imho.

A small benefit of the current implementation is that :any-link doesn't transform into duplicate rules like it would with :is.

:is is a forgiving selector list and each list item needs to be in its own rule to achieve this. The only browser that supports :link but not :visited and would benefit from this is IE3. So CSS becomes bigger with an :is based implementation without any real world benefit.


postcss-tape now emits a summary if there were failures :

I found that the new tape is really great to inspect unexpected changes.
But when I knowingly change something that affects postcss-preset-env, I just want to know which cases I need to update.

----------------------------------------

unexpected failures:
  - basic:stage0
  - basic:autoprefixer
  - basic:autoprefixer:false
  - basic:export

…c344' into 7.3-any-link--philosophical-american-bulldog-83d8f189d5
…c344' into 7.3-any-link--philosophical-american-bulldog-83d8f189d5
…c344' into 7.3-any-link--philosophical-american-bulldog-83d8f189d5
…c344' into 7.3-any-link--philosophical-american-bulldog-83d8f189d5
@romainmenke romainmenke marked this pull request as ready for review January 22, 2022 09:27
Copy link
Member

@Antonio-Laguna Antonio-Laguna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!

@romainmenke romainmenke merged commit e845484 into 7.3--philosophical-mayfly-9d15adc344 Jan 22, 2022
@romainmenke romainmenke deleted the 7.3-any-link--philosophical-american-bulldog-83d8f189d5 branch January 22, 2022 16:33
romainmenke added a commit that referenced this pull request Jan 31, 2022
* 7.3

* add `postcss-is-pseudo-class` to `postcss-preset-env` and `cli` (#159)

* add postcss-is-pseudo-class to preset-env and cli

* add test

* cli : emit warnings (#164)

* cli : emit warnings

* update change log

* Adding debug option (#163)

* Updating dependencies

* Simplifying Object usaging

* Clearer stage

* Adding debug

* Adding documentation

* Useful on issues too

* eslint enforce radix in parseInt

* Naive approach to using result.warn

* Clamping

* Switching for better clarity

* Update plugin-packs/postcss-preset-env/src/index.js

Co-authored-by: Romain Menke <11521496+romainmenke@users.noreply.github.com>

* Update plugin-packs/postcss-preset-env/src/index.js

Co-authored-by: Romain Menke <11521496+romainmenke@users.noreply.github.com>

* 7.3

* add `postcss-is-pseudo-class` to `postcss-preset-env` and `cli` (#159)

* add postcss-is-pseudo-class to preset-env and cli

* add test

* Updating CHANGELOG

* Fixing link

* Fixing changelog

Co-authored-by: romainmenke <romainmenke@gmail.com>
Co-authored-by: Romain Menke <11521496+romainmenke@users.noreply.github.com>

* Disable javascript features (#167)

* Updating dependencies

* Simplifying Object usaging

* Clearer stage

* Adding debug

* Adding documentation

* Useful on issues too

* eslint enforce radix in parseInt

* Naive approach to using result.warn

* Clamping

* Switching for better clarity

* Update plugin-packs/postcss-preset-env/src/index.js

Co-authored-by: Romain Menke <11521496+romainmenke@users.noreply.github.com>

* Update plugin-packs/postcss-preset-env/src/index.js

Co-authored-by: Romain Menke <11521496+romainmenke@users.noreply.github.com>

* 7.3

* add `postcss-is-pseudo-class` to `postcss-preset-env` and `cli` (#159)

* add postcss-is-pseudo-class to preset-env and cli

* add test

* Updating CHANGELOG

* Fixing link

* Fixing changelog

* Moving to separate file

* Adding option that disables client side polyfills

* Adding useful logging to debug mode

* Consistency

* Adding meaningful tests

* Updating README

* Update plugin-packs/postcss-preset-env/README.md

Co-authored-by: Romain Menke <11521496+romainmenke@users.noreply.github.com>

* Adding missing library

Co-authored-by: romainmenke <romainmenke@gmail.com>
Co-authored-by: Romain Menke <11521496+romainmenke@users.noreply.github.com>

* apply new test suite to more plugins and sourcemap fixes

* Revert "apply new test suite to more plugins and sourcemap fixes"

This reverts commit b94037e.

* apply new test suite to more plugins and sourcemap fixes (#182)

* apply new test suite to more plugins and sourcemap fixes

* cleanup dev dependencies

* Removing Can I Use Lite (#185)

* Getting things up to date

* Creating a query for browsers from given browser support

* Updating tests

* Moving to cssdb feature

* Using the new logic with logs too

* Allowing `.` for float versions

* Updating package

* flip disableClientSidePolyfills (#189)

* :any-link fixes (#183)

* :any-link fixes

* update tests

* update tests

* make it work without :is

* postcss-hwb-function in preset-env / cli (#190)

* postcss-hwb-function in preset-env / cli

* add a test for hwb in preset-env

* merge

* add a shortcut to rewrite expect files and log warnings (#193)

* add a shortcut to rewrite expect files

* emit warnings if they don't match

* Adding Opacity Percent Feature (#196)

* Updating badges (#197)

* Replacing all chat badges

* Adding package phobia

#165

* Adding PostCSS clamp (#198)

* Adding postcss-clamp

* Updating CHANGELOG

* New test for preserve: true with every feature enabled

* postcss-is-pseudo-class : better warnings and skip (#199)

* wip

* wip

* wip

* wip

* wip

* finish

* Getting ready-er

* Integrate font & display plugins (#205)

* Adding two new plugins

* Adding missing plugins to the CLI

* postcss-is-pseudo-class : browser tests and transform in 2 stages (#212)

* postcss-is-pseudo-class : browser tests

* postcss-is-pseudo-class: 2 stage transform

* cleanup

* postcss-preset-env: filter features by implementation status (#211)

* postcss-preset-env: filter by implementation status

* tweak

* fix insertBefore/insertAfter

* fix

* few more tests and simplify postcss-tape expect/result option

* fix

* update docs

* postcss-preset-env: pin some features to stage: 1 (#213)

* Adding more to the README (#207)

* Adding more to the README

#202

* Updating docs

* Update plugin-packs/postcss-preset-env/README.md

Co-authored-by: Romain Menke <11521496+romainmenke@users.noreply.github.com>

* Update plugin-packs/postcss-preset-env/README.md

Co-authored-by: Romain Menke <11521496+romainmenke@users.noreply.github.com>

* Update plugin-packs/postcss-preset-env/README.md

Co-authored-by: Romain Menke <11521496+romainmenke@users.noreply.github.com>

* Update plugin-packs/postcss-preset-env/README.md

Co-authored-by: Romain Menke <11521496+romainmenke@users.noreply.github.com>

* Update plugin-packs/postcss-preset-env/README.md

Co-authored-by: Romain Menke <11521496+romainmenke@users.noreply.github.com>

Co-authored-by: Romain Menke <11521496+romainmenke@users.noreply.github.com>

* Updating CSSDB to latest version

* Tests fixing

* Test after building

* Upgrading all deps

* Updating packages

Co-authored-by: Antonio Laguna <sombragriselros@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants