Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: polyfill css :has with postcss plugin #3019

Closed
wants to merge 2 commits into from

Conversation

mattjennings
Copy link
Contributor

===:clipboard: PR Checklist :clipboard:===

  • 📌 issue exists in github for these changes
  • 🔬 existing tests still pass
  • 🙈 code conforms to the style guide
  • 📐 new tests written and passing / old tests updated with new scenario(s)
  • 📄 changelog entry added (or not needed)

==================

Polyfills CSS :has using the css-has-pseudo postcss plugin. It also involves a JS polyfill (~12kb). Theoretically solves #2981 ... but I haven't tested this on an affected browser.

There's potential for it to not be perfect (see "Known Shortcomings" section in its readme), but initially it seems OK, but given the CSS+JS size increase + potential issues with docusaurus pages, we'll have to consider if it's worth it or not.

Highlighted section is the polyfill I believe

CleanShot 2024-04-07 at 18 32 17@2x

@github-actions github-actions bot added the bug This issue describes undesirable, incorrect, or unexpected behavior label Apr 7, 2024
Copy link

cloudflare-workers-and-pages bot commented Apr 7, 2024

Deploying excaliburjs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 6214891
Status: ✅  Deploy successful!
Preview URL: https://b3371684.excaliburjs.pages.dev
Branch Preview URL: https://fix-docs-polyfill-css-has.excaliburjs.pages.dev

View logs

@eonarheim
Copy link
Member

@mattjennings Awesome I had no idea this was a thing!

@eonarheim
Copy link
Member

Bummer looks like safari 13 doesn't like it still in browserstack, I'll try it locally with browserstack to be sure

image

@mattjennings
Copy link
Contributor Author

Ahh shoot. I was surprised such a thing existed as well, as I remember this being one of those things that you couldn't polyfill for the longest time.

Well, IMO this is a docusaurus issue, and this was probably the best shot we had at doing anything about it save for migrating to an entirely different docs framework. So we may have to close #2981 as a can't/won't fix, unfortunately.

@eonarheim
Copy link
Member

Ahh shoot. I was surprised such a thing existed as well, as I remember this being one of those things that you couldn't polyfill for the longest time.

Well, IMO this is a docusaurus issue, and this was probably the best shot we had at doing anything about it save for migrating to an entirely different docs framework. So we may have to close #2981 as a can't/won't fix, unfortunately.

Agreed, I'll open a bug against docusaurus and close ours

@eonarheim
Copy link
Member

eonarheim commented Apr 25, 2024

Closing for now, opened an issue on docusaurus facebook/docusaurus#10074

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue describes undesirable, incorrect, or unexpected behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants