style1.cssи
style2.css
const element = document.getElementById("yourID");
element.classList.toggle("mobile");
<html>
<head>
</head>
<body>
<div>
<button id="buttonView"">change view</button>
</div>
<script src="popup.js"></script>
</body>
</html>
function changeView () {
const element = document.getElementById("yourID");
element.classList.toggle("mobile");
}
const button = document.getElementById("buttonView");
button.addEventListener('click', changeView, false);
...
<body>
<div id="wrapper">
<div>...<.div>
<span>...</span>
.....
</div>
</body>