HTML style="@media rule" is possible?

I’m in an editor, which formats the:

<style></style>

Is it possible to make the format below @media?

style="@media only screen and (max-width: 600px) {
   .thanks {
     color: green;
   }
}"

Thanks in advance.

I think you are trying to put a media query rule inline to an element. This is not allowed. Media queries have to be stand alone rules in a stylesheet or in between <style></style> tags. Just not inline to an element using the style attribute.

:slight_smile:

1 Like

No :slight_smile: .