viewport to JS (css deprecated)

This commit is contained in:
Mstrdav 2021-03-07 13:20:02 +01:00
parent 56834414b7
commit 63565dd5d3
3 changed files with 6 additions and 8 deletions

View file

@ -7,7 +7,6 @@ See http://ocsigen.org/ and http://caml.inria.fr/ for information -->
<title>TP Ada S2</title> <title>TP Ada S2</title>
<meta content="text/html; charset=utf-8" http-equiv="content-type" /> <meta content="text/html; charset=utf-8" http-equiv="content-type" />
<link media="all" href="../ystyle.css" rel="stylesheet" /> <link media="all" href="../ystyle.css" rel="stylesheet" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="../Scripts/yfold.js"></script> <script src="../Scripts/yfold.js"></script>
</head> </head>

View file

@ -94,6 +94,12 @@ function toggleYfold(id) {
window.onload = function() { window.onload = function() {
console.log("DOM loaded.") console.log("DOM loaded.")
var meta = document.createElement('meta')
meta.setAttribute('name', 'viewport')
meta.setAttribute('content', 'width=device-width, initial-scale=1.0')
document.querySelector('head').appendChild(meta)
var snippets = document.getElementsByTagName("code"); var snippets = document.getElementsByTagName("code");
for (var snippet of snippets) { for (var snippet of snippets) {
if ((snippet.classList.value.includes("page")) || (snippet.classList.value.includes("block"))) { if ((snippet.classList.value.includes("page")) || (snippet.classList.value.includes("block"))) {

View file

@ -4,13 +4,6 @@
src: url('/Y/Poppins-Light.ttf') format('truetype'); src: url('/Y/Poppins-Light.ttf') format('truetype');
} }
/* VIEWPORT */
@viewport {
width: device-width;
initial-scale: 1.0;
zoom: 1;
}
/* règles generéales */ /* règles generéales */
* { * {
margin: 0px; margin: 0px;