Step 66 Learn Accessibility by Building a Quiz

Wrap the appropriate rule within a prefers-reduced-motion media rule such that a scroll-behavior of smooth is only set if the user’s browser setting is no-preference

I got stuck in this step, what should i do? No matter what i try i got the message above.

@media (no-preference) { 
 * {
  scroll-behavior: smooth;


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 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.64 Safari/537.36 Edg/101.0.1210.53

Challenge: Step 66

Link to the challenge:

You have to specify both prefers-reduced-motion and no-preference.

Like this:
(prefers-reduced-motion: no-preference)

I don’t think this exercise is well-explained, and the MDN docs aren’t very helpful either.
Although this CSS-Tricks article has some examples.

I’ll raise a PR for this exercise to suggest that it offer a little more explanation of the required format.

1 Like

I did as you said and i got the same hint.

@media (prefers-reduced-motion: no-preference) {
 * {
  scroll-behavior: smooth, no-preference;

Forget what i said. I see that i didn’t dele the no-preference in scroll-behavior

No worries, this stuff can get very confusing. :smile:

1 Like

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