Learn Accessibility by Building a Quiz - Step 66

Hello there! :wave:

I’m currently stuck and I’m not quite sure why. The task was to implement the @media rule the same way it was written the task and I did it that way, but it’s wrong.
I already googled and tried out a different version of how to code it but apparently, it’s still wrong.
I would be more than happy if someone could help me out here, thanks in advance for your answers :slight_smile:

  1. Version
* {
  @media (prefers-reduced-motion: no-preference) {
    selector {
      scroll-behavior: smooth;
    }
  }
}

  1. Version (with help from Google)
* {
  @media screen and (prefers-reduced-motion: no-preference) {
    selector {
      scroll-behavior: smooth;
    }
  }
}

My browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.115 Safari/537.36 OPR/88.0.4412.75

Challenge: Learn Accessibility by Building a Quiz - Step 66

Link to the challenge:

1 Like

You have to specify the selector. That is * in the place of selector.

I already noticed that right after I posted this thread and defined the selector but it’s still not working.

Now I got it, that’s the solution:

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

You’re not allowed to put a Media Query in a selector, it must stay alone.
Thank you for helping though :slight_smile: !

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