0

In CSS selectors, sometimes @ is used, such as in @media and @font-face. What happens behind the scenes that makes the @ required?

1 Answer 1

2

These are what know as an at-rule, you can view the documentation here. This is because they aren't ruled sets where they just apply styles in the normal sense. It doesn't target 1 group of elements. It either has rule sets nested in them or input styles into the program such as @font-face.

1
  • 2
    For additional clarity: at-rules are not selectors.
    – BoltClock
    Commented Feb 7, 2022 at 18:12

Not the answer you're looking for? Browse other questions tagged or ask your own question.