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

delete deprecated clip example #35956

Merged
merged 5 commits into from
Oct 23, 2024
Merged

Conversation

ramyaparimi
Copy link
Contributor

Description

clip is deprecated; deleted it from the CSS example in this page https://developer.mozilla.org/en-US/docs/Web/API/File_API/Using_files_from_web_applications

fixes #35743

Motivation

I have learnt so much from MDN docs and want to contribute back. Deleting deprecated examples with help reader learn relevant stuff.

@ramyaparimi ramyaparimi requested a review from a team as a code owner September 19, 2024 14:08
@ramyaparimi ramyaparimi requested review from sideshowbarker and removed request for a team September 19, 2024 14:08
@github-actions github-actions bot added Content:WebAPI Web API docs size/xs [PR only] 0-5 LoC changed labels Sep 19, 2024
Copy link
Contributor

github-actions bot commented Sep 19, 2024

Preview URLs

(comment last updated: 2024-10-23 18:54:56)

Copy link
Member

@Josh-Cena Josh-Cena left a comment

Choose a reason for hiding this comment

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

This makes this input actually visible because it has 1px size. Have you checked out the suggestion in #35743 (comment)?

adding modern `clip-path: inset(50%);` property
@github-actions github-actions bot added size/s [PR only] 6-50 LoC changed and removed size/xs [PR only] 0-5 LoC changed labels Sep 19, 2024
…/index.md

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@ramyaparimi
Copy link
Contributor Author

I guess I was over ambitious by taking up this task 😞 . I hope I understood the context better this time. I am still not very confident with CSS styling.

@Josh-Cena Josh-Cena removed their request for review September 19, 2024 21:59
@Josh-Cena Josh-Cena dismissed their stale review September 19, 2024 22:00

I'm not confident with reviewing this either

@Josh-Cena Josh-Cena requested review from estelle and removed request for sideshowbarker September 19, 2024 22:00
@Josh-Cena Josh-Cena assigned Josh-Cena and unassigned Josh-Cena Sep 19, 2024
@Josh-Cena
Copy link
Member

Perhaps @estelle could say more about best practices here.

@ramyaparimi
Copy link
Contributor Author

ramyaparimi commented Sep 20, 2024

So I tested both stylings, the one in the MDN docs and other from the A11Y project. They both seem to have the same output but both of them use clip feature.

So next, I went to the clip doc on MDN to see any suggestions are made on how to replace clip. This suggested to use the new clip-path property, which is mentioned in the A11Y project and the comment in the issue.

So I then tested the code removing clip but keeping the clip-path: inset(50%); property, and the outcome seems to be same as with clip property.

So I went and changed the CSS styling by completely removing clip property and keeping the clip-path: inset(50%) property. The output was still same as with clip, which is expected as clip-path is replacing the deprecated clip property.

However, doing all these tests got me curious as to why there is a need to use any clip property at all. Because when I removed both clip and clip-path from styling, the outcome was still the same. There was no difference at all 🤔 .

Here are the screenshots.

With clip as in MDN docs:

image

with new clip-path
image

Without both clip and clip-path

image

Please let me know if I am missing anything in my understanding. I am still not great with CSS and all its complexities 🙈 .

ramyaparimi and others added 2 commits September 20, 2024 13:33
add clip-path remove clip
Copy link
Member

@estelle estelle left a comment

Choose a reason for hiding this comment

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

Thank you. Also, congratulations on your first merged MDN content PR. Welcome to the team!

@estelle estelle merged commit a59ff90 into mdn:main Oct 23, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:WebAPI Web API docs size/s [PR only] 6-50 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

clip is deprecated
3 participants