CSS Unused CSS Stages Media Queries Device-Specific Media Queries: Part 1

Chris Martinez
Chris Martinez
11,715 Points

why wouldn't i want to use "only" in every media query?

why wouldn't i want to use the word "only" in every media queery (at least the type we've done so far that are based on viewport size)?

1 Answer

In the previous video, Adaptive Layouts with Media Queries, it says: "The 'only' operator is useful for preventing older browsers that do not support media queries from applying the given styles". It then states that "it's optional and we don't have to use it, but it is recommended of you need the support of older browsers".

Since the lesson is creating something optimized for an iPhone, maybe they're assuming that a newer browser would be used?