forked from emmetio/emmet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcssFeatures.html
45 lines (42 loc) · 1015 Bytes
/
cssFeatures.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
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title>Find all vendor-prefixed CSS properties</title>
</head>
<body>
<h2>All properties</h2>
<div id="all-props"></div>
<script type="text/javascript">
(function() {
var style = window.getComputedStyle(document.body, null);
var prefixedProperties = [];
var re = /^\-[a-z]+\-/, p;
if (style.length) {
for (var i = 0, il = style.length; i < il; i++) {
p = style.item(i);
if (re.test(p)) {
prefixedProperties.push(p.replace(re, ''));
}
}
} else {
// fucking Opera...
re = /^[A-Z][a-z]*/;
for (p in style) {
if (re.test(p)) {
prefixedProperties.push(
p
.replace(re, '')
.replace(/([a-z])([A-Z])/g, function(str, p1, p2) {
return p1 + '-' + p2.toLowerCase();
})
.toLowerCase()
);
}
}
}
document.getElementById('all-props').innerHTML = prefixedProperties.join(', ');
})();
</script>
</body>
</html>