Answer the question
In order to leave comments, you need to log in
Why media request is not processed correctly?
The html has this tag. The resolution of the device clearly does not fall within the specified range. Checked in web inspector. But for some reason the styles are still loaded on the site. It seemed to me that the styles should not be loaded if the media expression is not executed.
<link type="text/css" rel="stylesheet" href="/sites/default/files/css/css_JzJU2q_K9XiQApcqbkJg_PWAoZ8u0E_tlt9VuQ.css" media="only screen and (min-width: 768px) and (max-width: 1024px)">
Answer the question
In order to leave comments, you need to log in
Styles are always loaded, everything, no matter how many media queries.
To make them work, they need to be included after the main styles.
<link rel="stylesheet" href="main.css">
<link rel="stylesheet" href="media.css" media="only screen and (min-width: 768px) and (max-width: 1024px)">
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question