Skip to content

Commit 7783add

Browse files
committedOct 21, 2018
Comply with WCAG contrast guidelines in demo.
1 parent 2063e42 commit 7783add

File tree

1 file changed

+55
-69
lines changed

1 file changed

+55
-69
lines changed
 

‎index.html

+55-69
Original file line numberDiff line numberDiff line change
@@ -3,136 +3,122 @@
33
<head>
44
<meta charset="utf-8">
55
<title>Turndown Demo</title>
6-
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/7.0.0/normalize.min.css" />
6+
<meta name="viewport" content="width=device-width">
77
<style>
8-
.cf:before,
9-
.cf:after {
10-
content: " ";
11-
display: table;
12-
}
13-
14-
.cf:after {
15-
clear: both;
16-
}
17-
18-
.cf {
19-
*zoom: 1;
20-
}
21-
228
* {
239
-webkit-box-sizing: border-box;
2410
-moz-box-sizing: border-box;
2511
box-sizing: border-box;
2612
}
2713

2814
body {
29-
background-color: #ccc;
3015
margin: 0 auto;
31-
font-size: 14px;
32-
font-family: sans-serif;
33-
line-height: 1.4;
16+
font-family: courier, monospace, sans-serif;
17+
line-height: 1.3125;
3418
color: #333;
3519
}
3620

3721
header {
38-
padding: 1em;
39-
overflow: hidden;
22+
padding: 0.5em;
4023
background-color: #fff;
24+
text-align: center;
4125
}
4226

4327
footer {
28+
font-size: 0.875em;
4429
text-align: center;
4530
color: #666;
46-
text-shadow: 0 1px 0 #ddd;
4731
}
4832

49-
a,
50-
a:visited {
33+
h1,
34+
label[for="input"],
35+
label[for="output"] {
36+
margin: 0;
37+
font-size: 1em;
5138
font-weight: 700;
52-
text-decoration: none;
39+
letter-spacing: 0.0625em;
40+
text-transform: uppercase;
5341
}
5442

55-
h1 {
56-
float: left;
57-
margin: 0;
58-
font-size: 1em;
43+
label[for="input"],
44+
label[for="output"] {
45+
font-weight: 400;
5946
}
6047

61-
h2 {
62-
color: #fff;
63-
margin-bottom: 0;
48+
.source-link {
49+
font-size: 0.875em;
50+
}
51+
52+
.row:before,
53+
.row:after {
54+
content: " ";
55+
display: table;
56+
}
57+
58+
.row:after {
59+
clear: both;
60+
}
61+
62+
.row {
63+
*zoom: 1;
6464
}
6565

6666
.col,
6767
.form-group {
68-
padding: 0 10px;
68+
padding: 0 0.5em;
6969
}
7070

71-
.form-group {
72-
float: left;
71+
@media (min-width: 36em) {
72+
.col {
73+
float: left;
74+
width: 50%;
75+
}
7376
}
7477

7578
textarea {
7679
width: 100%;
77-
height: 600px;
80+
height: 36em;
7881
margin: 0;
79-
padding: .5em;
82+
padding: 0.5em;
8083
overflow: auto;
81-
border: none;
84+
border: 1px solid;
8285
background-color: #fff;
83-
font-family: courier, monospace;
86+
font-family: inherit;
8487
font-size: inherit;
88+
line-height: inherit;
8589
color: inherit;
8690
}
8791

8892
#input {
89-
background: #333;
93+
background-color: #333;
9094
color: #fff;
91-
}
92-
93-
.toolbar {
94-
padding-top: 5px;
95-
padding-bottom: 5px;
96-
background-color: #e6e6e6;
95+
border: none;
9796
}
9897

9998
select {
10099
display: block;
101100
width: 100%;
102-
font-size: 14px;
101+
font-size: inherit;
103102
}
104103

105-
@media (min-width: 768px) {
106-
body {
107-
font-size: 16px;
108-
}
109-
110-
.col {
111-
float: left;
112-
width: 50%;
113-
padding: 0 15px;
114-
}
115-
116-
.row {
117-
padding-right: 15px;
118-
padding-left: 15px;
119-
}
104+
.form-group {
105+
display: inline-block;
120106
}
121107

122108
.form-group label {
123-
font-size: 14px;
109+
font-size: 0.875em;
124110
}
125111
</style>
126112
<script src="https://unpkg.com/turndown/dist/turndown.js"></script>
127113
</head>
128114
<body>
129115
<header>
130116
<h1>turndown</h1>
131-
<a style="float: right" href="https://github.com/domchristie/turndown">Source on GitHub</a>
117+
<a class="source-link" href="https://github.com/domchristie/turndown">Source on GitHub</a>
132118
</header>
133-
<div class="row cf">
119+
<div class="row">
134120
<div class="col">
135-
<h2>HTML</h2>
121+
<label for="input">HTML</label>
136122
<textarea cols="100" rows=10 id="input"><h1>Turndown Demo</h1>
137123

138124
<p>This demonstrates <a href="https://github.com/domchristie/turndown">turndown</a> – an HTML to Markdown converter in JavaScript.</p>
@@ -162,12 +148,12 @@ <h2>Usage</h2>
162148
</ul></textarea>
163149
</div>
164150
<div class="col">
165-
<h2>Markdown</h2>
151+
<label for="output">Markdown</label>
166152
<textarea readonly cols="100" rows=10 id="output"></textarea>
167153
</div>
168154
</div>
169155

170-
<div class="row cf">
156+
<div class="row">
171157
<form method="get" action="/turndown" id="options">
172158
<div class="form-group">
173159
<label for="headingStyle">Heading style</label>
@@ -246,7 +232,7 @@ <h2>Markdown</h2>
246232
</form>
247233
</div>
248234

249-
<footer><p>turndown is copyright © 2017 <a href="http://www.domchristie.co.uk/">Dom Christie</a> and is released under the MIT license</p></footer>
235+
<footer><p>Turndown is copyright © 2017 <a href="http://www.domchristie.co.uk/">Dom Christie</a> and is released under the MIT license</p></footer>
250236
<script>
251237
;(function () {
252238
var input = document.getElementById('input')

0 commit comments

Comments
 (0)
Please sign in to comment.