Media Screen
What is the difference between:
vs
And which one is better to use to target small screen devices for responsiveness?
9 Replies
Type in "media" in the search bar in here, there's an answer right below your post.
Sorry but it does not answer my question.
https://discord.com/channels/436251713830125568/1050303423951671306/1050401167357775942
This specifically doesn't answer it?
Actually I wanted to know the difference between "media screen" vs "media only screen".
Its similar but not exactly same. Sometimes very little difference makes big difference. Anyway, never mind
Yeah, that's what it says there. Basically only screen doesn't apply styles to printing, while media does.
So Media Only Screen same as Media Screen?
Media does consider styles when printing.
only in media queries is more a "fix" for backwards compatibility than anything else, it seems:
Applies a style only if an entire query matches. It is useful for preventing older browsers from applying selected styles. When not usingāhttps://developer.mozilla.org/en-US/docs/Web/CSS/@media#onlyonly, older browsers would interpret the queryscreen and (max-width: 500px)asscreen, ignoring the remainder of the query, and applying its styles on all screens. If you use theonlyoperator, you must also specify a media type.
Thanks, I have decided to go with only š