Defining CSS media queries within selectors

前端 未结 3 1656
我在风中等你
我在风中等你 2021-02-01 16:48

Are there any issues (performance is my primary concern) if instead of defining css selectors within media queries (example 1), you define media queries within css selectors (ex

3条回答
  •  温柔的废话
    2021-02-01 17:15

    The issue is it doesn't work! Things may have changed over the years. I tried putting media queries inside the selectors, at least Firefox complains its an invalid property name.

    Here's what MDN says:

    The @media at-rule may be placed at the top level of your code or nested inside any other conditional group at-rule.

    It can only be nested inside another conditional group at-rule.

提交回复
热议问题