forked from d3ward/toolz
-
Notifications
You must be signed in to change notification settings - Fork 0
/
units.html
208 lines (190 loc) · 11.5 KB
/
units.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<title>Units Test</title>
<meta name="description" content="Test the viewport units in CSS">
<!-- Google / Search Engine Tags -->
<meta itemprop="name" content="Toolz by d3ward - Units Test">
<meta itemprop="description" content="Test the viewport units in CSS">
<meta itemprop="image" content="https://d3ward.github.io/toolz/src/preview_toolz.png">
<!-- Facebook Meta Tags -->
<meta property="og:url" content="https://d3ward.github.io/toolz/fontlist">
<meta property="og:type" content="website">
<meta property="og:title" content="Toolz by d3ward - Units Test">
<meta property="og:description" content="Test the viewport units in CSS">
<meta property="og:image" content="https://d3ward.github.io/toolz/src/preview_toolz.png">
<!-- Twitter Meta Tags -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="Toolz by d3ward - Units Test">
<meta name="twitter:description" content="Test the viewport units in CSS">
<meta name="twitter:image" content="https://d3ward.github.io/toolz/src/preview_toolz.png">
<link rel="shortcut icon" href="./src/svg/toolz.svg" type="image/svg+xml">
<script async defer src="https://aurora-d3.herokuapp.com/public/aurora.js"
aurora-id="520ce98a53142dd933fe4c0f3abb41a0">
</script>
<link href="src/css/style.css" rel="stylesheet">
<style>
body {
background-color: var(--bg);
background-image: none;
}
[data-theme=dark],
html,
[data-theme=light] {
--primary: var(--orange);
}
main {
padding-top: 6rem;
}
div.test {
display: inline-block;
margin: 0;
font-size: 24px;
font-weight: bold;
border: 5px solid var(--red);
padding-top: 50px;
text-align: center;
box-sizing: border-box;
width: 20%;
color: black;
}
.a {
background-color: var(--green);
height: 50vh;
}
.b {
background-color: var(--blue);
height: 50%;
}
</style>
</head>
<body>
<header class="fixed">
<nav>
<a href="units.html">
<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 512 512">
<path
d="M464 272h-224v-224C240 21.6 218.4 0 192 0H48C21.6 0 0 21.6 0 48v416C0 490.4 21.6 512 48 512h416c26.4 0 48-21.6 48-48V320C512 293.6 490.4 272 464 272zM464 464h-416v-416H192v47.1H112c-8.836 0-16 7.162-16 16c0 8.836 7.164 16 16 16L192 128v64H112C103.2 192 96 199.2 96 208C96 216.8 103.2 224 112 224H192v64H112C103.2 288 96 295.2 96 304C96 312.8 103.2 320 112 320H192v80C192 408.8 199.2 416 208 416C216.8 416 224 408.8 224 400V320h64v80c0 8.836 7.164 16 16 16c8.838 0 16-7.164 16-16V320h64v80c0 8.836 7.164 16 16 16c8.838 0 16-7.164 16-16V320h48V464z">
</path>
</svg>
</a>
<ul>
<li>
<a href="https://d3ward.github.io/toolz/">
<svg viewBox="0 0 12.002 12.7" class="_icon" xmlns="http://www.w3.org/2000/svg">
<defs>
<linearGradient id="prefix__a">
<stop offset="0" stop-color="#fc575e" />
<stop offset="1" stop-color="#f7b42c" />
</linearGradient>
</defs>
<g paint-order="stroke markers fill" stroke-width="10.32">
<path d="M8 4.22c.581-.065 3.977.236 3.961.314L5.19 8.361.034 8.214z" fill-opacity=".831" />
<path
d="M3.579 4.385C1.42 4.27.047 2.012 0 0h3.982c3.437 0 4.025.013 4.24.044 2.282-.027 3.674 2.286 3.74 4.49M7.38 8.204c2.537.053 4.463 2.109 4.622 4.496l-7.9-.016c-1.18-.019-4.052-1.81-4.068-4.47" />
</g>
</svg>
Toolz - Home
</a>
</li>
<li>
<a class="bmc" target="_blank" href="https://www.buymeacoffee.com/dOWS9cU">
<svg role="img" class="_icon" id="bmac-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<title>Buy Me A Coffee icon</title>
<path
d="M20.216 6.415l-.132-.666c-.119-.598-.388-1.163-1.001-1.379-.197-.069-.42-.098-.57-.241-.152-.143-.196-.366-.231-.572-.065-.378-.125-.756-.192-1.133-.057-.325-.102-.69-.25-.987-.195-.4-.597-.634-.996-.788a5.723 5.723 0 00-.626-.194c-1-.263-2.05-.36-3.077-.416a25.834 25.834 0 00-3.7.062c-.915.083-1.88.184-2.75.5-.318.116-.646.256-.888.501-.297.302-.393.77-.177 1.146.154.267.415.456.692.58.36.162.737.284 1.123.366 1.075.238 2.189.331 3.287.37 1.218.05 2.437.01 3.65-.118.299-.033.598-.073.896-.119.352-.054.578-.513.474-.834-.124-.383-.457-.531-.834-.473-.466.074-.96.108-1.382.146-1.177.08-2.358.082-3.536.006a22.228 22.228 0 01-1.157-.107c-.086-.01-.18-.025-.258-.036-.243-.036-.484-.08-.724-.13-.111-.027-.111-.185 0-.212h.005c.277-.06.557-.108.838-.147h.002c.131-.009.263-.032.394-.048a25.076 25.076 0 013.426-.12c.674.019 1.347.067 2.017.144l.228.031c.267.04.533.088.798.145.392.085.895.113 1.07.542.055.137.08.288.111.431l.319 1.484a.237.237 0 01-.199.284h-.003c-.037.006-.075.01-.112.015a36.704 36.704 0 01-4.743.295 37.059 37.059 0 01-4.699-.304c-.14-.017-.293-.042-.417-.06-.326-.048-.649-.108-.973-.161-.393-.065-.768-.032-1.123.161-.29.16-.527.404-.675.701-.154.316-.199.66-.267 1-.069.34-.176.707-.135 1.056.087.753.613 1.365 1.37 1.502a39.69 39.69 0 0011.343.376.483.483 0 01.535.53l-.071.697-1.018 9.907c-.041.41-.047.832-.125 1.237-.122.637-.553 1.028-1.182 1.171-.577.131-1.165.2-1.756.205-.656.004-1.31-.025-1.966-.022-.699.004-1.556-.06-2.095-.58-.475-.458-.54-1.174-.605-1.793l-.731-7.013-.322-3.094c-.037-.351-.286-.695-.678-.678-.336.015-.718.3-.678.679l.228 2.185.949 9.112c.147 1.344 1.174 2.068 2.446 2.272.742.12 1.503.144 2.257.156.966.016 1.942.053 2.892-.122 1.408-.258 2.465-1.198 2.616-2.657.34-3.332.683-6.663 1.024-9.995l.215-2.087a.484.484 0 01.39-.426c.402-.078.787-.212 1.074-.518.455-.488.546-1.124.385-1.766zm-1.478.772c-.145.137-.363.201-.578.233-2.416.359-4.866.54-7.308.46-1.748-.06-3.477-.254-5.207-.498-.17-.024-.353-.055-.47-.18-.22-.236-.111-.71-.054-.995.052-.26.152-.609.463-.646.484-.057 1.046.148 1.526.22.577.088 1.156.159 1.737.212 2.48.226 5.002.19 7.472-.14.45-.06.899-.13 1.345-.21.399-.072.84-.206 1.08.206.166.281.188.657.162.974a.544.544 0 01-.169.364zm-6.159 3.9c-.862.37-1.84.788-3.109.788a5.884 5.884 0 01-1.569-.217l.877 9.004c.065.78.717 1.38 1.5 1.38 0 0 1.243.065 1.658.065.447 0 1.786-.065 1.786-.065.783 0 1.434-.6 1.499-1.38l.94-9.95a3.996 3.996 0 00-1.322-.238c-.826 0-1.491.284-2.26.613z" />
</svg></a>
<a href="https://github.com/d3ward">
<svg class="_icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
<title>Github</title>
<path
d="M256,32C132.3,32,32,134.9,32,261.7c0,101.5,64.2,187.5,153.2,217.9a17.56,17.56,0,0,0,3.8.4c8.3,0,11.5-6.1,11.5-11.4,0-5.5-.2-19.9-.3-39.1a102.4,102.4,0,0,1-22.6,2.7c-43.1,0-52.9-33.5-52.9-33.5-10.2-26.5-24.9-33.6-24.9-33.6-19.5-13.7-.1-14.1,1.4-14.1h.1c22.5,2,34.3,23.8,34.3,23.8,11.2,19.6,26.2,25.1,39.6,25.1a63,63,0,0,0,25.6-6c2-14.8,7.8-24.9,14.2-30.7-49.7-5.8-102-25.5-102-113.5,0-25.1,8.7-45.6,23-61.6-2.3-5.8-10-29.2,2.2-60.8a18.64,18.64,0,0,1,5-.5c8.1,0,26.4,3.1,56.6,24.1a208.21,208.21,0,0,1,112.2,0c30.2-21,48.5-24.1,56.6-24.1a18.64,18.64,0,0,1,5,.5c12.2,31.6,4.5,55,2.2,60.8,14.3,16.1,23,36.6,23,61.6,0,88.2-52.4,107.6-102.3,113.3,8,7.1,15.2,21.1,15.2,42.5,0,30.7-.3,55.5-.3,63,0,5.4,3.1,11.5,11.4,11.5a19.35,19.35,0,0,0,4-.4C415.9,449.2,480,363.1,480,261.7,480,134.9,379.7,32,256,32Z" />
</svg>
</a>
<div class="nav-item theme-toggle">
<span class="light-icon theme-icon">
<svg class="_icon" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
<path d="M17.293 13.293A8 8 0 016.707 2.707a8.001 8.001 0 1010.586 10.586z"></path>
</svg>
</span>
<span class="dark-icon theme-icon">
<svg class="_icon" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd"
d="M10 2a1 1 0 011 1v1a1 1 0 11-2 0V3a1 1 0 011-1zm4 8a4 4 0 11-8 0 4 4 0 018 0zm-.464 4.95l.707.707a1 1 0 001.414-1.414l-.707-.707a1 1 0 00-1.414 1.414zm2.12-10.607a1 1 0 010 1.414l-.706.707a1 1 0 11-1.414-1.414l.707-.707a1 1 0 011.414 0zM17 11a1 1 0 100-2h-1a1 1 0 100 2h1zm-7 4a1 1 0 011 1v1a1 1 0 11-2 0v-1a1 1 0 011-1zM5.05 6.464A1 1 0 106.465 5.05l-.708-.707a1 1 0 00-1.414 1.414l.707.707zm1.414 8.486l-.707.707a1 1 0 01-1.414-1.414l.707-.707a1 1 0 011.414 1.414zM4 11a1 1 0 100-2H3a1 1 0 000 2h1z"
clip-rule="evenodd"></path>
</svg>
</span>
</div>
</li>
</ul>
<button>
<svg aria-hidden="true" version="1.1" viewBox="0 0 24 24">
<line x1="2" y1="4" x2="22" y2="4" id="top" />
<line x1="2" y1="12" x2="22" y2="12" id="middle-down" />
<line x1="2" y1="12" x2="22" y2="12" id="middle-up" />
<line x1="2" y1="20" x2="22" y2="20" id="bottom" />
</svg>
</button>
</nav>
</header>
<main>
<h3>Test Viewport Units</h3>
<p>The following figures are used to test the css viewport problem.<br>
If the two figures have the same dimensions it means that your browser is not affected by the bug </p>
<div class="_txt-center">
<div class="test a">50vh</div>
<div class="test b">50%</div>
</div>
<div>
<a class="btn" href="https://allthingssmitty.com/2020/05/11/css-fix-for-100vh-in-mobile-webkit/">CSS fix for
100vh</a>
<a class="btn" href="https://www.bram.us/2020/05/06/100vh-in-safari-on-ios/">100vh in Safari</a>
<a class="btn" href="https://maximilianschmitt.me/posts/css-100vh-mobile-browsers/"> CSS 100vh Mobile Browsers</a>
<a class="btn"
href="https://medium.com/@susiekim9/how-to-compensate-for-the-ios-viewport-unit-bug-46e78d54af0d">It’s not a
bug,
it’s a feature</a>
<a class="btn" href="https://css-tricks.com/the-trick-to-viewport-units-on-mobile/">The trick of Viewport
Units</a>
<a class="btn" href="https://chanind.github.io/javascript/2019/09/28/avoid-100vh-on-mobile-web.html">Avoid 100vh
on Mobile
Web</a>
<a class="btn" href="https://bugs.webkit.org/show_bug.cgi?id=141832">WebKit Bugzilla</a>
<a class="btn" href="https://twitter.com/AllThingsSmitty/status/1254151507412496384/">Matt Smith Solution</a>
</div>
<hr>
<footer class="_bg _radius _aos">
<div class="cnt ">
<div class="grid">
<div>Icons by <b><a href="https://heroicons.dev/">Heroicons</a> (<a
href="https://github.com/tailwindlabs/heroicons/blob/master/LICENSE" class="_txt-cl">MIT</a>)</b>
</div>
<div>
Designed by Eduard Ursu(<b><a href="https://d3ward.github.io">d3ward</a></b>) © 2021
</div>
<div>
This website use <b><a href="https://www.useaurora.app/">Aurora - Open Web Analytics</a></b>
</div>
<div>
Licensed under <b><a href="https://creativecommons.org/licenses/by-nc-sa/4.0/">[NC-SA-4.0]</a></b>
</div>
</div>
</div>
</footer>
</main>
<button class="gt-link hide" id="gt-link">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 6">
<path d="M12 6H0l6-6z" /></svg>
</button>
</body>
<script src="./src/js/script.js"></script>
<script>
// Call the function when the DOM is loaded
document.addEventListener("DOMContentLoaded", () => {
new navbar();
new themeManager();
new gotop();
new aos();
});
</script>
</html>