CSS Responsive Layouts Media Queries Creating Breakpoints

Obe Juarez
Obe Juarez
6,028 Points

When it comes to media types, whats the difference between @media (min-width:) and @media 👉🏻 screen only (min-width:)?

Why declare screen only if @media works just fine?

1 Answer

Clayton Perszyk
MOD
Clayton Perszyk
Treehouse Moderator 46,608 Points

It means the styles within will apply only to media type screen. Other media types are: print, all, and speech. Media type, all, is the default if no other type is given.

As for why declare as type screen, is that you may only want to apply the styles to screens (e.g. computer, tablet, phone screen), and not to all media types.