Home > database >  What makes @ required in some CSS selectors?
What makes @ required in some CSS selectors?

Time:02-06

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

CodePudding user response:

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.

  •  Tags:  
  • Related