Media Query error while building quiz

Tell us what’s happening:
Instruction is not clear to me, i seem to be adding the right media query but its throwing an error

Hint

You should have one @media (prefers-reduced-motion: no-preference) rule.

Your code so far

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

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/102.0.5005.61 Safari/537.36

Challenge: Step 66

Link to the challenge:

Hi @mayank.r13,

There seems to be some formatting error in your post here on the forum.

Regarding your trouble with the challenge: Your code doesn’t make the scroll-behavior smooth for all the classes (when you start the challenge the code looks like this:

* {
scroll-behavior: smooth;
}

And then it wants you to change the code so it makes sure the user has no preference before applying the rule of scroll-behavior. When your system sees that the user have “no preference” then the rule should be applied.

Here is an example that maybe can inspire you to find the solution. In this example, there is a change in the class animation if the user prefers reduced motion, the structure is similar as to how your solution should look:

@media (prefers-reduced-motion: reduce) {
  .animation {
    animation-name: dissolve;
  }
}

Good luck :slight_smile: