Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

Support PostCSS 8 #191

Closed
jonathantneal opened this issue Sep 15, 2020 · 50 comments
Closed

Support PostCSS 8 #191

jonathantneal opened this issue Sep 15, 2020 · 50 comments

Comments

@jonathantneal
Copy link
Collaborator

Hey, neat project. I did notice this is still running PostCSS 7. I also saw that it hasn’t had a commit since April. Did you have a chance to see that PostCSS 8 is out? The creators of the project have even released this migration guide.

  • Can we expect support for PostCSS 8?
  • Are you still working on the project?
  • Can I help? 😄

Oh wait hold up I’m me. Umm...

  • Yes!
  • Yes, tho proof must be in the pudding.
  • Of course.
@Semigradsky
Copy link
Member

I will be happy to help 😸

@Semigradsky
Copy link
Member

Semigradsky commented Sep 16, 2020

Plugin Ready for Postcss 8 Note
css-blank-pseudo ✅ Ready - v2.0.0 Plugin require JS
css-has-pseudo ✅ Ready - v2.0.0 Plugin require JS
css-prefers-color-scheme ✅ Ready - v5.0.0 Plugin require JS; >92% browser support
postcss-color-functional-notation ✅ Ready - v4.0.0 >93% browser support
postcss-color-hex-alpha ✅ Ready - v7.0.0 >94% browser support
postcss-custom-media ✅ Ready - v8.0.0
postcss-custom-selectors ✅ Ready - v6.0.0
postcss-dir-pseudo-class ✅ Ready - v6.0.0
postcss-double-position-gradients ✅ Ready - v3.0.0 >93% browser support
postcss-env-function ✅ Ready - v4.0.0 >93% browser support
postcss-focus-visible ✅ Ready - v6.0.0 Plugin require JS
postcss-focus-within ✅ Ready - v5.0.0 Plugin require JS; >94% browser support
postcss-font-variant ✅ Ready - v5.0.0
postcss-gap-properties ✅ Ready - v3.0.0 >93% browser support
postcss-image-set-function ✅ Ready - v4.0.0
postcss-lab-function ✅ Ready - v4.0.0
postcss-logical ✅ Ready - v5.0.0
postcss-media-minmax ✅ Ready - v5.0.0
postcss-nesting ✅ Ready - v8.0.0
postcss-overflow-shorthand ✅ Ready - v3.0.0 >92% browser support
postcss-page-break ✅ Ready - v3.0.2
postcss-place ✅ Ready - v7.0.0 >94% browser support
postcss-selector-not ✅ Ready - v5.0.0 >91% browser support

Candidates for removing?

Plugin Ready for Postcss 8 Note
postcss-attribute-case-insensitive ✅ Ready - v5.0.0 96.35% browser support - candidate for removing?
postcss-color-gray PR was merged. Wait new release. Was removed from Spec - candidate for removing?
postcss-color-mod-function PR was merged. Wait new release. Was removed from Spec - candidate for removing?
postcss-color-rebeccapurple ✅ Ready - v7.0.0 97.19% browser support - candidate for removing?
postcss-custom-properties ✅ Ready - v12.0.0 Has limitations. Also 96.21% browser support - candidate for removing?
postcss-font-family-system-ui ✅ Ready - v5.0.0 Currently postcss-preset-env use 'fork'; 95.07% browser support - candidate for removing?
postcss-initial ✅ Ready - v4.0.0 97.88% browser support - candidate for removing?
postcss-pseudo-class-any-link ✅ Ready - v7.0.0 97.38% browser support - candidate for removing?
postcss-replace-overflow-wrap ✅ Ready - v4.0.0 97.15% browser support - candidate for removing?
postcss-selector-matches PR: postcss/postcss-selector-matches#22 :mathes was renamed to :is and incorrectly implemented - candidate for removing?

@Semigradsky
Copy link
Member

Semigradsky commented Sep 16, 2020

Candidates for adding

Plugin Ready for Postcss 8 Note
postcss-font-format-keywords ✅ Ready - v2.0.0
postcss-clamp ✅ Ready - v2.0.0 >92% browser support
postcss-normalize-display-values ✅ Ready - v5.0.0
postcss-ic-unit ✅ Ready - v2.0.0
postcss-opacity-percentage ✅ Ready - v1.0.0

@JLHwung
Copy link

JLHwung commented Sep 16, 2020

Note that it is also blocked by an upstream postcss-tape issue: csstools/postcss-tape#5

@goto-bus-stop
Copy link

PR for postcss-color-hex-alpha: postcss/postcss-color-hex-alpha#15

@heath-freenome
Copy link

heath-freenome commented Oct 23, 2020

How close are you to making the simplest update possible ready (i.e. just porting to the Once() syntax), then doing the hard work of switching to using the Rule(), AtRule(), etc... later?

kodiakhq bot pushed a commit to vercel/next.js that referenced this issue Jan 22, 2021
I realized while looking over this that the `autoprefixer` plugin isn't being used by postcss because it's not included in the `postcss.config.js`. Additionally, since `postcss-preset-env` doesn't support PostCSS 8 yet, and it includes PostCSS 7 as a dependency, I've removed that package. 

There is an open issue to add PostCSS 8 support to `postcss-preset-env` [here](csstools/postcss-preset-env#191). @kripod's comments on my other PR #20956 are what prompted me to check this out. 

On a side note, it looks like all the CMS examples use Tailwind CSS v1 still, so that's something someone (possibly myself) could tackle later.
@solidevolution
Copy link

Are there any updates?

@Semigradsky
Copy link
Member

@solidevolution see #191 (comment)

If you'd like to help you can open a PR in any repo that doesn't already have PostCSS8 support or review existing PRs.

@pi0
Copy link

pi0 commented Mar 5, 2021

Hi @jonathantneal. Would you please confirm if above table is updated?

@zleight1
Copy link

I can keep up with Discord and Slack. Here’s an invite link for anyone willing to help.

https://discord.gg/JTHpyexU

Looks like this invite expired

@crooksey
Copy link

I can keep up with Discord and Slack. Here’s an invite link for anyone willing to help.
https://discord.gg/JTHpyexU

Looks like this invite expired

https://discord.gg/9GZNpqXR

@Antonio-Laguna
Copy link
Member

Happened again. Can't join. Is there anything I can do to help?

@xithalius
Copy link

Happened again. Can't join. Is there anything I can do to help?

This link won't expire: https://discord.gg/8wHumqgb9r

@mikestopcontinues
Copy link

@Semigradsky It's been about a month since your last chart update. Are we close? 👀

@Semigradsky
Copy link
Member

Semigradsky commented Aug 28, 2021

@mikestopcontinues as I see there is nothing new: the PRs have been merged, but there have been no new releases.

@dargmuesli
Copy link
Contributor

@Semigradsky we've managed to release css-blank-pseudo and css-has-pseudo today. Other releases are going to follow in the coming days.

@dargmuesli
Copy link
Contributor

All plugins are updated now! 🥳 the last thing to do is to release a new postcss-preset-env version.
For that the postcss-preset-env plugin definition itself needs to be updated! (https://github.com/csstools/postcss-preset-env/blob/next/release/src/postcss.js#L11).

@jonathantneal and I will meet next week again. In the meantime we'd welcome a PR which completes the work on the next/release branch as mentioned, so that we can quickly release the final postcss8 compatibility next week! Thank you.

@Antonio-Laguna
Copy link
Member

Thanks a lot @dargmuesli and @jonathantneal ! I'm going to get started on that PR ASAP and will update here.

@Airkro
Copy link

Airkro commented Sep 24, 2021

Please considering turn off all the plugins that require JS by default.

@zangab
Copy link

zangab commented Oct 10, 2021

... so that we can quickly release the final postcss8 compatibility next week!

Any update on this?

@dargmuesli
Copy link
Contributor

A new release of https://github.com/shellscape/postcss-values-parser was necessary, which was just created. I proposed the next meeting for the new week in which we could finish our work.

@dargmuesli
Copy link
Contributor

Jonathan is currently on vacation this week, let's continue next week.

@vivshaw
Copy link

vivshaw commented Oct 20, 2021

As far as I know, the PostCSS 8 chart in this issue is incorrect- postcss-nesting is not actually ready for PostCSS 8 and has had an open issue about it since May 10. The bug in question prevents postcss-nesting and postcss-mixins from being used together. I can still reproduce this bug as of today.

@dargmuesli
Copy link
Contributor

Today we took care of postcss-nesting and decided that turning of JS plug-ins could still be made later on after the basic postcss8 compatibility release.
Let me cite Jonathan's message in Discord for your convenience:

We made our way into PostCSS Preset Env and ran into a 'killer' bug. It must be resolved by writing a new css values parser.

The 'killer' bug is best explained in 2 steps.

  1. PostCSS does not parse smaller tokens like preludes (known as at-rule params or rule selectors in PostCSS) or declaration values.
  2. PostCSS Values Parser incorrectly parses these smaller tokens and actually throws.

@dargmuesli and I saw this bug for ourselves when running the PostCSS tests:

at /csstools/postcss-preset-env/test/basic.css:38:1
at Input.error (/csstools/postcss-preset-env/node_modules/postcss/lib/input.js:123:16)
at ValuesParser.unknownWord (/csstools/postcss-preset-env/node_modules/postcss/lib/parser.js:518:22)
at ValuesParser.unknownWord (/csstools/postcss-preset-env/node_modules/postcss-values-parser/lib/ValuesParser.js:195:15)```

We specifically ran into this when parsing @media (480px <= width < 768px) {}. We cannot not support this rule, as it actually works in some browsers.
The solution is for me to finally write the parser I keep talking about and applying to the custom media, media range, and env() polyfills.

@dargmuesli
Copy link
Contributor

Hey guys, just want to let you know that @romainmenke and @Antonio-Laguna are now working on the finishing touches and are waiting for feedback and approval of their contributions from Jonathan. For details see the Discord mentioned above.

Still, we're so close to the goal! I think my job is done here, fingers crossed for the remaining bits to settle.
- Jonas

@Antonio-Laguna
Copy link
Member

Closed with #220 ! Thanks to all

@Antonio-Laguna Antonio-Laguna unpinned this issue Nov 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests