-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
303 lines (285 loc) · 7.79 KB
/
index.html
File metadata and controls
303 lines (285 loc) · 7.79 KB
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
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Browser Score</title>
<link rel="icon" href="ui/logo.svg" id="favicon" />
<link rel="stylesheet" href="ui/css/style.css" />
<script>
document.documentElement.style.colorScheme =
localStorage.getItem('color-scheme-toggle');
</script>
<script src="src/app.js" type="module"></script>
</head>
<body>
<h1>
<a href="?">
<small>How does my</small>
Browser Score?
</a>
</h1>
<template id="feature-component-template">
<wrap-if
:is="isCollapsible ? 'details' : ''"
class="feature-group"
:class="{spec: species === 'Spec'}"
:data-level="level"
:key="feature.uid || feature.id"
:id="feature.htmlId || feature.id"
ref="details"
@toggle="handleToggle"
:open="defaultOpen"
ref="details"
>
<component
v-if="level > 0"
:is="isCollapsible ? 'summary' : 'article'"
class="featurish"
:class="{
[passclass(feature.score)]: true,
feature: species === 'Feature',
}"
:data-level="level"
ref="container"
>
<support-status
:title="feature.result?.note || null"
:score="feature.score"
v-if="showScore"
></support-status>
<wrap-if
v-if="feature.title || feature.code || feature.id"
:is="species === 'Feature' ? '' : 'h' + level"
class="title"
>
<span
class="title"
v-if="feature.titleHtml"
v-html="feature.titleHtml"
></span>
<wrap-if
:is="feature.title ? 'span' : 'code'"
class="title"
v-else
v-text="feature.title ?? feature.code ?? feature.id"
></wrap-if>
</wrap-if>
<span class="prefix" v-if="feature.result?.prefix"
>{{ feature.result.prefix }}</span
>
<div class="meta" v-if="permalink || feature.link || feature.mdnLink">
<a
v-if="permalink"
:href="permalink"
class="icon-before permalink"
title="Permalink"
></a>
<a
v-if="feature.link && feature.spec"
:href="feature.link"
target="_blank"
class="badge primary spec-link"
:class="`${feature.spec.org.id}-link`"
>
{{ feature.spec.org.title }}
<span v-if="feature.link === feature.draftLink">Proposal</span>
</a>
<a
v-if="feature.specLink && feature.spec && feature.specLink !== feature.link"
:href="feature.specLink"
target="_blank"
class="badge spec-link"
:class="`${feature.spec.org.id}-link`"
>Spec</a
>
<a
v-if="feature.draftLink && feature.spec && feature.draftLink !== feature.specLink"
:href="feature.draftLink"
target="_blank"
class="badge spec-link"
:class="`${feature.spec.org.id}-link`"
>Draft</a
>
<a
v-if="feature.mdnLink"
:href="feature.mdnLink"
target="_blank"
class="badge spec-link mdn-link"
>MDN</a
>
</div>
<div class="spacer"></div>
<span class="count" v-if="showFeatureCount">{{ feature.score.total }}</span>
</component>
<div
v-if="feature.children.length > 0"
class="feature-children"
:class="{empty: renderedChildren.length === 0}"
:hidden="renderedChildren.length > 0 ? false : untilFound"
@beforematch="everOpened = true"
>
<template v-if="renderedChildren.length > 0">
<bs-feature
v-for="child, index of renderedChildren"
:parent="feature"
:feature="child"
:key="child.uid"
:level="level + 1"
></bs-feature>
</template>
<template v-else>
{{ feature.children.map(child => JSON.stringify(child)).join('\n') }}
</template>
</div>
</wrap-if>
</template>
<div id="main_content" v-cloak>
<color-scheme-toggle></color-scheme-toggle>
<main id="tests">
<header v-if="score">
<h1>Your browser scores <strong v-content="percent(score)">0%</strong></h1>
<div class="description">
<support-status :score="score" ref="supportStatus"></support-status>
<ui-tooltip>
<span class="recognized">Recognized</span>
<article class="caution tooltip">
<p>
<strong>Caution:</strong> This test checks which web platform
features the browser recognizes, <em>not</em> whether they are
implemented correctly.
</p>
</article>
</ui-tooltip>
<span
:title="`passed ${round(score.passedTests)} out of ${score.totalTests} tests`"
>
<strong v-content="round(score.passed)">0</strong>
out of <strong v-content="round(score.total)">0</strong> features
</span>
in <strong v-content="round(score.testTime) + ' ms'">0 ms</strong>
</div>
</header>
<section id="all">
<bs-feature
:feature="computedRoot"
ref="root"
@update:score="score = $event"
></bs-feature>
</section>
</main>
<aside>
<carbon-ads params="zoneid=1673&serve=C6AILKT&placement=css3testcom"></carbon-ads>
<fieldset>
<legend>Group by</legend>
<label>
<input type="checkbox" name="groupby" v-model="groupBy" value="spec" />
Spec
</label>
<label>
<input type="checkbox" name="groupby" v-model="groupBy" value="type" />
Type
</label>
</fieldset>
<fieldset class="filters">
<legend>Filter features</legend>
<bs-filter
label="Type"
v-model="filter.type"
with-empty
:values="featureTypes"
:get-label="(id, meta) => meta.title ?? capitalize(id)"
></bs-filter>
<div class="filter">
Show:
<label>
<input
type="checkbox"
name="filter.supported"
v-model="filter.supported"
value="pass"
/>
Supported
</label>
<label>
<input
type="checkbox"
name="filter.supported"
v-model="filter.supported"
value="partial"
/>
Partially supported
</label>
<label>
<input
type="checkbox"
name="filter.supported"
v-model="filter.supported"
value="fail"
/>
Unsupported
</label>
</div>
</fieldset>
<fieldset class="filters">
<legend>Filter specs</legend>
<bs-filter
label="Status"
v-model="filter.status"
:values="{'': 'Any except legacy', 'all': 'Any', 'stable': 'Stable', 'experimental': 'Experimental'}"
></bs-filter>
<bs-filter
label="Snapshot"
v-model="filter.snapshot"
with-empty
:values="snapshots"
></bs-filter>
<bs-filter
label="Standards group"
v-model="filter.group"
with-empty
:values="groups"
:get-label="(id, group) => group?.title || id || group"
></bs-filter>
<bs-filter
v-if="filter.group === 'csswg'"
label="CSS level"
v-model="filter.version"
with-empty
:values="[2.2, 3, 4, 5, 6]"
></bs-filter>
<details>
<summary>
Showing <strong v-text="score?.children.length"></strong> specs
</summary>
<ul id="specsTested">
<li
v-for="spec in specs"
:key="spec.id"
:class="passclass({
passed: spec.score.passed,
total: spec.score.total,
})"
>
<support-status :score="spec.score"></support-status>
<a :href="`#${spec.id}`">{{ spec.title }}</a>
</li>
</ul>
</details>
</fieldset>
<p>
Want more tests?
<a href="https://github.com/LeaVerou/css3test" target="_blank">Be my guest!</a>
</p>
<footer>
<p>
Handcrafted by <a href="https://lea.verou.me">Lea Verou</a> and
<a href="https://github.com/LeaVerou/css3test/graphs/contributors"
>friends</a
>
✿ <a href="https://github.com/sponsors/LeaVerou">Sponsor</a>
</p>
</footer>
</aside>
</div>
</body>
</html>