js/debug
This commit is contained in:
parent
469989740b
commit
69daecd39b
4 changed files with 36 additions and 0 deletions
|
@ -7,10 +7,14 @@
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>Title.</title>
|
<title>Title.</title>
|
||||||
<link rel="stylesheet" href="style/main.css">
|
<link rel="stylesheet" href="style/main.css">
|
||||||
|
<script src="script/debug.js" defer></script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
|
<header id="debug">
|
||||||
|
</header>
|
||||||
|
|
||||||
<header>
|
<header>
|
||||||
<img src="images/logo.svg" alt="Logo of the website.">
|
<img src="images/logo.svg" alt="Logo of the website.">
|
||||||
<nav aria-label="Main navigation">
|
<nav aria-label="Main navigation">
|
||||||
|
|
|
@ -31,3 +31,12 @@ Main
|
||||||
|
|
||||||
.. literalinclude:: style/main.css
|
.. literalinclude:: style/main.css
|
||||||
:language: css
|
:language: css
|
||||||
|
|
||||||
|
JS
|
||||||
|
==
|
||||||
|
|
||||||
|
Debug
|
||||||
|
-----
|
||||||
|
|
||||||
|
.. literalinclude:: script/debug.js
|
||||||
|
:language: js
|
||||||
|
|
10
rtfd/public/html/script/debug.js
Normal file
10
rtfd/public/html/script/debug.js
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
const body = document.body
|
||||||
|
|
||||||
|
const style = window.getComputedStyle(body)
|
||||||
|
|
||||||
|
const font_size = style.fontSize
|
||||||
|
|
||||||
|
|
||||||
|
const debug = document.getElementById("debug")
|
||||||
|
|
||||||
|
debug.innerHTML = `Font size = ${font_size}`
|
|
@ -1,4 +1,16 @@
|
||||||
/*
|
/*
|
||||||
|
16 1
|
||||||
|
17 1.0625
|
||||||
|
18 1.125
|
||||||
|
19 1.1875
|
||||||
|
20 1.25
|
||||||
|
21 1.3125
|
||||||
|
22 1.375
|
||||||
|
phone: 480 px
|
||||||
|
tablet: 768 px
|
||||||
|
laptop: 1024 px
|
||||||
|
desktop: 1366 px
|
||||||
|
|
||||||
block-size ← height
|
block-size ← height
|
||||||
(border|padding)-block[-start|end]
|
(border|padding)-block[-start|end]
|
||||||
(border|padding)-inline[-start|end]
|
(border|padding)-inline[-start|end]
|
||||||
|
@ -21,6 +33,7 @@ background-position: center;
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
color: #777;
|
color: #777;
|
||||||
font-family: monospace;
|
font-family: monospace;
|
||||||
|
font-size: 1rem;
|
||||||
line-height: 1.25;
|
line-height: 1.25;
|
||||||
margin-block: 0;
|
margin-block: 0;
|
||||||
margin-inline: auto;
|
margin-inline: auto;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue