Learn More About CSS Pseudo Selectors By Building A Balance Sheet - Step 31

Tell us what’s happening:

Hello. I don’t need help with this step, I just wanted to recommend an update. I googled the clip property and it has apparently been deprecated, so you guys might want to look into updating this step :slight_smile:

Your code so far

WARNING

The challenge seed code and/or your solution exceeded the maximum length we can port over from the challenge.

You will need to take an additional step here so the code you wrote presents in an easy to read format.

Please copy/paste all the editor code showing in the challenge from where you just linked.

Replace these two sentences with your copied code.
Please leave the ``` line above and the ``` line below,
because they allow your code to properly format in the post.

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36

Challenge: Learn More About CSS Pseudo Selectors By Building A Balance Sheet - Step 31

Link to the challenge:

Ya, it looks like clip-path is preferred over clip and basically does the same thing (and more).

This step (and the several that follow) are building up the sr-only class (which stands for “screen reader only”). This class allows you to visibly hide content on the page but still allow screen readers to see it. If you google for how to create this class you will almost always find that it uses both clip and clip-path. This class has been tested extensively with various screen reader/browser combinations over the years. It might have some properties that don’t quite make obvious sense, but they are most likely there to deal with specific screen reader issues. So FCC is just following current best practices for creating this class.

Since clip is officially deprecated, I doubt you would want to use clip for anything else nowadays. Perhaps FCC could add a note stating that the use of clip is for historical reasons only with regards to accessibility? Not sure if that’s worth the extra text.

1 Like

Thanks for your message, I actually didn’t know clip-path was preferred over clip. I thought the two go hand in hand, good to know that clip-path is the way to go.

And I do agree with you, I think if FCC doesn’t want to completely remove the clip step(s)- which they should, in my opinion-they should at least add a note so people don’t think clip is still the preferable property.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.