/
CSSLintDemo.htm
82 lines (69 loc) · 1.42 KB
/
CSSLintDemo.htm
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>CSSLint Demo</title>
<style>
html { font: 14px sans-serif; }
.error { color: #D9534F; font-weight: bold; }
.warning { color: #F0AD4E; }
</style>
<script src="../dist/csslint.js"></script>
<script src="demo.js"></script>
</head>
<body>
<h1>CSSLint Demo</h1>
<textarea rows="30" cols="100" id="input">
@charset "UTF-8";
@import url("booya.css") print, screen;
@import "whatup.css" screen;
@import "wicked.css";
/*Error*/
@charset "UTF-8";
@namespace "http://www.w3.org/1999/xhtml";
@namespace svg "http://www.w3.org/2000/svg";
/*Warning: empty ruleset */
.foo {
}
h1 {
font-weight: bold;
}
/*Warning: qualified heading */
.foo h1 {
font-weight: bold;
}
/*Warning: adjoining classes */
.foo.bar {
zoom: 1;
}
li.inline {
width: 100%; /*Warning: 100% can be problematic*/
}
li.last {
display: inline;
padding-left: 3px !important;
padding-right: 3px;
border-right: 0px;
}
@media print {
li.inline {
color: black;
}
}
@page {
margin: 10%;
counter-increment: page;
@top-center {
font-family: sans-serif;
font-weight: bold;
font-size: 2em;
content: counter(page);
}
}
</textarea>
<br>
<button id="lint-btn">Run CSSLint</button>
<p>(You may want to keep the CSS kinda small, this could take a while.)</p>
<div id="output"></div>
</body>
</html>