Due to certain limitations, I am unable to make any changes to the HTML code of the project I am currently working on. As a result, I am unable to include the following attribute:
<meta name="viewport" content="width=device-width, initial-scale=1.0">
I attempted to address this issue in my CSS file with the following code:
@viewport {
width: device-width;
zoom: 1;
}
However, it seems that this solution did not produce the desired outcome. When testing on an iPhone, the breakpoints were still incorrect. It appears that this feature may not be supported by browsers yet.
If achieving this through CSS is not feasible, is there a way to set this in a server side header? For instance, in the case of Internet Explorer, I added X-UA-Compatible:IE=Edge,chrome=1
to the Apache response header. Can a similar approach be taken for the viewport tag?