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

fix(helper): .sr-only clip #297

Merged
merged 1 commit into from
Dec 7, 2024
Merged

Conversation

typed-sigterm
Copy link
Contributor

@typed-sigterm typed-sigterm commented Dec 7, 2024

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines.
  • Provide a description in this PR that addresses what the PR is solving. If this PR is going to solve an existing issue, please reference the issue (e.g. close #123).

What is the purpose of this pull request?

  • Bug fix
  • New feature
  • Other

Description

clip has been deprecated, and rect (0, 0, 0, 0) should be rect(0 0 0 0)

Copy link

netlify bot commented Dec 7, 2024

Deploy Preview for vuepress-ecosystem ready!

Name Link
🔨 Latest commit 8720f04
🔍 Latest deploy log https://app.netlify.com/sites/vuepress-ecosystem/deploys/6753ec16ef40580008889058
😎 Deploy Preview https://deploy-preview-297--vuepress-ecosystem.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 12210710363

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 59.925%

Totals Coverage Status
Change from base Build 12210361779: 0.0%
Covered Lines: 1300
Relevant Lines: 1966

💛 - Coveralls

@Mister-Hope Mister-Hope merged commit 0c79df6 into vuepress:main Dec 7, 2024
21 checks passed
@typed-sigterm typed-sigterm deleted the patch-1 branch December 7, 2024 06:48
@labuladong
Copy link

Hi @Mister-Hope, I think clip: rect(0 0 0 0); should not be removed. Some devices such as wechat browser don't support clip-path.

image

@typed-sigterm
Copy link
Contributor Author

typed-sigterm commented Jan 21, 2025

@labuladong I tried that in WeChat, but it worked fine. It seems that my WeChat is using Chromium 130. (test site)

@labuladong
Copy link

Oh, it failed in my WeChat and reproduced with https://developers.weixin.qq.com/miniprogram/dev/devtools/download.html

My workaround is adding this CSS manually.

@Mister-Hope
Copy link
Member

image

As far as the data shows: It is widely supported in any common browser. Only if where you are reporting, WeChat is using X5 (QQ browser core), that could be possible to fail. But that's out of concern here.

@typed-sigterm
Copy link
Contributor Author

There's another solution - just remove clip-path and clip, add !important to .sr-only rules.

@Mister-Hope
Copy link
Member

Mister-Hope commented Jan 22, 2025

Update here, I tried WeChat devetools and reproduce what you are reporting:

image

It does say it does not support clip-path, but it's using chrome 86.

According to https://caniuse.com/mdn-css_properties_clip-path_basic_shape and real test on a chrome 55 with playwright, everything is working as expected.

Maybe you should raise an issue to WeChat to team to as why this property is not supported as a real chrome 86 does. BTW try to reproduce yourself in a chrome 86 first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants