-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathindex.html
403 lines (346 loc) · 16.7 KB
/
index.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
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
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1">
<meta name="description" content="AcceCSS - A Sass mixin that debugs & checks the accessibility of your designs">
<link rel="icon" type="image/png" href="dist/images/favicon.png" />
<link rel="shortcut icon" type="image/png" href="dist/images/favicon.png" />
<title>AcceCSS</title>
<link rel="stylesheet" href="dist/css/main.css">
</head>
<body>
<main>
<header role="header">
<div class="align">
<h1>Acce<span>CSS</span></h1>
<h2>A Sass Mixin</h2>
<h3>That debugs & checks the accessibility of your designs</h3>
</div>
</header>
<div class="content">
<!-- DAT MENU THO -->
<div class="menu">
<span id="openMenu"></span>
<ul>
<li><a href="#api">API</a></li>
<li><a href="#usage">Usage</a></li>
<li><a href="#demo">Demo</a></li>
<li><a href="#infos">Infos</a></li>
<li><a href="#thankyou">Thanks</a></li>
<li><a href="#questions">?</a></li>
</ul>
</div>
<!-- /ENDOF -->
<div class="introduction">
<div class="panel">
<p>This mixin will allow you to get an overview of all the zones of your layout, get a grayscaled version to check the contrast, as well as 8 different filters to emulate the most common coloblindness types</p>
<p>Find it on <a href="https://github.com/LukyVj/accecss/">Github</a>!</p>
</div>
</div>
<div class="content_api panel" id="api">
<header>
<h3>Simple API</h3>
</header>
<section>
<p>What we can call "The API" is the few parameters you will be able to change or combine to use the AcceCSS mixin, it's composed of 4 paramters so far</p>
<pre class="code-sample full-width"><code><span class="at-rule">@include</span> <span class="mixin">accecss( </span><span class="param">false</span><span class="coma">,</span> <span class="param">false</span><span class="coma"> ,</span> <span class="param">false</span><span class="coma"> ,</span> <span class="param">false</span><span class="mixin"> )</span><span class="coma">;</span>
<span class="comment"> <strong>^ ^ ^ ^</strong></span>
<span class="comment"> selector <strong>| </strong>css zones <strong>| </strong>grayscale<strong> | </strong>colorblind filter</span></code></pre>
<span class="divider"></span>
<div class="table">
<header><h3>API parameters</h3></header>
<div class="table-rows">
<div class="row"><div class="col">selector</div><div class="col">You must use quotes (<code>'</code>), ex: <code> '.selector'</code> </div></div>
<div class="row"><div class="col">CSS Zones</div><div class="col">Can be <code>true</code> or <code>false</code></div></div>
<div class="row"><div class="col">Grayscale</div><div class="col">Can be <code>true</code> or <code>false</code></div></div>
<div class="row"><div class="col">Colorblind filter</div><div class="col">Any of the filters on the list below, ex: <code>deuteranopia</code></div></div>
</div>
</div>
<span class="divider"></span>
<h4>Filters list</h4>
<ul id="filterList">
<li>protanopia</li>
<li>protanomaly</li>
<li>deuteranopia</li>
<li>deuteranomaly</li>
<li>tritanopia</li>
<li>tritanomaly</li>
<li>achromatopsia</li>
<li>achromatomaly</li>
</ul>
<span class="divider"></span>
<h4>Browser compatibility</h4>
<p>The AcceCSS mixin will work in any major evergreen browser :</p>
<ul class="list">
<li>
<a href="http://caniuse.com/#feat=svg-filters">
<img src="dist/images/chrome-icon.svg" />
Google Chrome</a>
</li>
<li>
<a href="http://caniuse.com/#feat=svg-filters">
<img src="dist/images/safari-icon.svg" />
Safari</a>
</li>
<li>
<a href="http://caniuse.com/#feat=svg-filters">
<img src="dist/images/firefox-icon.svg" />
Mozilla Firefox</a>
</li>
<li>
<a href="http://caniuse.com/#feat=svg-filters">
<img src="dist/images/ie-icon.svg" />
IE (partial)</a>
</li>
</
ul>
</div>
</section>
<div class="howto panel" id="usage">
<header>
<h3>How to use it</h3>
</header>
<section>
<h4>1 - Download</h4>
<p>First, go on <a href="https://github.com/LukyVj/accecss">Github</a>, and download the <a href="https://github.com/LukyVj/accecss/blob/gh-pages/css/accecss.scss">accecss.scss</a> file along with the <a href="https://github.com/LukyVj/accecss/blob/gh-pages/css/filters.svg">filter.svg</a></p>
<span class="divider"></span>
<h4>2 - @import</h4>
<p>Now, you have to import the mixin into your main stylesheet.</p>
<p>To keep things clear, I recommand using a <strong>main.scss</strong> file, and import both your <strong>styles</strong> and <strong>accecss</strong> mixin into it</p>
<pre class="code-sample full-width"><code><span class="at-rule">@import</span> <span class="coma">'</span><span class="param">style.scss</span><span class="coma">';</span>
<span class="at-rule">@import</span> <span class="coma">'</span><span class="param">accecss.scss</span><span class="coma">';</span>
</code></pre>
<span class="divider"></span>
<h4>3 - Use it</h4>
<p>Once <strong><a href="#one">1</a></strong> & <strong><a href="#two">2</a></strong> are done, you're ready to use the mixin, here is how looks an inactive Accecss mixin, note that by default, all the settings are set to false</p>
<pre class="code-sample full-width"><code><span class="at-rule">@include</span> <span class="mixin">accecss( </span><span class="param">
<span class="param">$element: false</span><span class="coma">,</span>
<span class="param">$zones: false</span><span class="coma">,</span>
<span class="param">$grayscale: false</span><span class="coma">,</span>
<span class="param">$cbFilter: false</span> <span class="comment">// COLORBLIND | False</span>
<span class="mixin">)</span><span class="coma">;</span>
</code></pre>
<span class="divider"></span>
<p>Let's say you want to debug your whole document, and, for example, let's say you want to get your elements outlined</p>
<pre class="code-sample full-width"><code><span class="at-rule">@include</span> <span class="mixin">accecss( </span><span class="param">
<span class="active">$element: 'html body'</span><span class="coma">,</span>
<span class="active">$zones: true</span><span class="coma">,</span>
<span class="param">$grayscale: false</span><span class="coma">,</span>
<span class="param">$cbFilter: false</span>
<span class="mixin">)</span><span class="coma">;</span>
</code></pre>
<span class="divider"></span>
<p>To add a grayscaled effect : </p>
<pre class="code-sample full-width"><code><span class="at-rule">@include</span> <span class="mixin">accecss( </span><span class="param">
<span class="active">$element: 'html body'</span><span class="coma">,</span>
<span class="param">$zones: false</span><span class="coma">,</span>
<span class="active">$grayscale: true</span><span class="coma">,</span>
<span class="param">$cbFilter: false</span>
<span class="mixin">)</span><span class="coma">;</span>
</code></pre>
<span class="divider"></span>
<p>And finally, add a blindness color filter : </p>
<pre class="code-sample full-width"><code><span class="at-rule">@include</span> <span class="mixin">accecss( </span><span class="param">
<span class="active">$element: 'html body'</span><span class="coma">,</span>
<span class="param">$zones: false</span><span class="coma">,</span>
<span class="param">$grayscale: false</span><span class="coma">,</span>
<span class="active">$cbFilter: protanopia</span> <span class="comment">// You can use all <a href="#filterList">filters listed over</a></span>
<span class="mixin">)</span><span class="coma">;</span>
</code></pre>
<div class="warning">
<p>You will have to give the proper path to your <strong>filter.svg</strong>, for this, use the <code>$path-to-filter</code> variable, in the <strong>accecss.scss</strong> file.</p>
</div>
</section>
</div>
<div class="content_demos panel" id="demo">
<header>
<h3>Demos :</h3>
</header>
<div class="classes_list">
<div class="row">
<h4>Outlining :</h4>
<a href="javascript:void(0)" class="button" id="zones">CSS zones</a>
</div>
<div class="row">
<h4>Contrasts :</h4>
<a href="javascript:void(0)" class="button" id="grayscale">grayscale</a>
</div>
<div class="row">
<h4>Colorblindness filters :</h4>
<a href="javascript:void(0)" class="button" id="colorblind1">protanopia</a>
<a href="javascript:void(0)" class="button" id="colorblind2">protanomaly</a>
<a href="javascript:void(0)" class="button" id="colorblind3">deuteranopia</a>
<a href="javascript:void(0)" class="button" id="colorblind4">deuteranomaly</a>
<a href="javascript:void(0)" class="button" id="colorblind5">tritanopia</a>
<a href="javascript:void(0)" class="button" id="colorblind6">tritanomaly</a>
<a href="javascript:void(0)" class="button" id="colorblind7">achromatopsia</a>
<a href="javascript:void(0)" class="button" id="colorblind8">achromatomaly</a>
</div>
</div>
<div>
<h3>With text</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. <a href="#">foo</a> Repudiandae alias, ex porro eaque explicabo eligendi iusto nulla dolore laboriosam voluptatibus commodi <a href="#">bar</a> quaerat animi, doloribus et quam <a href="#">baz</a> vitae nobis obcaecati. Assumenda.</p>
</div>
<div>
<h3>With images</h3>
<ul>
<li><img src="http://thecatapi.com/api/images/get?format=src&type=jpg"></li>
<li><img src="http://thecatapi.com/api/images/get?format=src&type=png"></li>
<li><img src="http://thecatapi.com/api/images/get?format=src&type=jpg"></li>
<li><img src="http://thecatapi.com/api/images/get?format=src&type=gif"></li>
</ul>
</div>
</div>
<div class="content_informations panel" id="infos">
<header>
<h3>Informations about Colorblindness</h3>
</header>
<section>
<p>This project was born essentially because of this article : </p>
<p> <a href="https://medium.com/@aaron10buuren/designing-for-and-with-color-blindness-48392aab3d87">https://medium.com/@aaron10buuren/designing-for-and-with-color-blindness-48392aab3d87</a></p>
<span class="divider"></span>
<p>After some researches I discovered this information :</p>
<blockquote>Colour (color) blindness (colour vision deficiency, or CVD) affects approximately <strong>1 in 12 men</strong> (<strong>8%</strong>) and <strong>1 in 200 women</strong> in the world. In Britain this means that there are approximately 2.7 million colour blind people (about 4.5% of the entire population), most of whom are male.</blockquote>
<small>-<a href="#"> Source (http://www.colourblindawareness.org/colour-blindness/)</a></small>
</section>
</div>
<div class="content_thankyou panel" id="thankyou">
<header>
<h3>Thank you</h3>
</header>
<p>A big thank you to <a href="https://demont.is">@dervondenbergen</a> for his precious help, and his advices.</p>
<p>Thank you to <a href="http://bullg.it">@bullgit</a> for being awesome and provide me priceless feedbacks </p>
<p>A huge thank you to <a href="http://thecatapi.com/">thecatapi.com</a>, for the awesome.. Cat API!</p>
</div>
<div class="content_question panel" id="questions">
<header>
<h3>Question ?</h3>
</header>
<section>
<p>For any further informations, feel free to ping me on twitter : <a href="http://twitter.com/lukyVj">@LukyVj</a></p>
</section>
</div>
<div class="content_github panel" id="github">
<header>
<h3>Github</h3>
</header>
<section>
<div class="github_actions">
<iframe src="https://ghbtns.com/github-btn.html?user=lukyvj&repo=accecss&type=star&count=true" frameborder="0" scrolling="0" width="170px" height="20px"></iframe>
<iframe src="https://ghbtns.com/github-btn.html?user=lukyvj&repo=accecss&type=watch&count=true&v=2" frameborder="0" scrolling="0" width="170px" height="20px"></iframe>
<iframe src="https://ghbtns.com/github-btn.html?user=lukyvj&repo=accecss&type=fork&count=true" frameborder="0" scrolling="0" width="170px" height="20px"></iframe>
</div>
</section>
</div>
</div> <!-- ENDOF content -->
<div class="share">
<a href="https://twitter.com/intent/tweet?text=AcceCSS+-+A+Sass+mixin+That+debugs+%26+checks+the+accessibility+of+your+designs+http%3A%2F%2Flukyvj.github.io%2Faccecss%2F+via+%40lukyvj"><img src="dist/images/twitter-icon.svg" alt=""></a>
</div>
<footer role="footer">
<small>2015 - <a href="http://twitter.com/LukyVj">@LukyVj</a> - <a href="http://github.com/lukyvj/accecss">github</a></small>
<br/>
<small>For a better, more open & accessible web</small>
</footer>
</main>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1">
<defs>
<filter id="goo">
<feGaussianBlur in="SourceGraphic" stdDeviation="10" result="blur" />
<feColorMatrix in="blur" mode="matrix" values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 18 -7" result="goo" />
<feBlend in="SourceGraphic" in2="goo" />
</filter>
</defs>
</svg>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns="http://www.w3.org/2000/svg"
version="1.1">
<defs>
<filter id="protanopia">
<feColorMatrix
in="SourceGraphic"
type="matrix"
values="0.567, 0.433, 0, 0, 0
0.558, 0.442, 0, 0, 0
0, 0.242, 0.758, 0, 0
0, 0, 0, 1, 0"/>
</filter>
<filter id="protanomaly">
<feColorMatrix
in="SourceGraphic"
type="matrix"
values="0.817, 0.183, 0, 0, 0
0.333, 0.667, 0, 0, 0
0, 0.125, 0.875, 0, 0
0, 0, 0, 1, 0"/>
</filter>
<filter id="deuteranopia">
<feColorMatrix
in="SourceGraphic"
type="matrix"
values="0.625, 0.375, 0, 0, 0
0.7, 0.3, 0, 0, 0
0, 0.3, 0.7, 0, 0
0, 0, 0, 1, 0"/>
</filter>
<filter id="deuteranomaly">
<feColorMatrix
in="SourceGraphic"
type="matrix"
values="0.8, 0.2, 0, 0, 0
0.258, 0.742, 0, 0, 0
0, 0.142, 0.858, 0, 0
0, 0, 0, 1, 0"/>
</filter>
<filter id="tritanopia">
<feColorMatrix
in="SourceGraphic"
type="matrix"
values="0.95, 0.05, 0, 0, 0
0, 0.433, 0.567, 0, 0
0, 0.475, 0.525, 0, 0
0, 0, 0, 1, 0"/>
</filter>
<filter id="tritanomaly">
<feColorMatrix
in="SourceGraphic"
type="matrix"
values="0.967, 0.033, 0, 0, 0
0, 0.733, 0.267, 0, 0
0, 0.183, 0.817, 0, 0
0, 0, 0, 1, 0"/>
</filter>
<filter id="achromatopsia">
<feColorMatrix
in="SourceGraphic"
type="matrix"
values="0.299, 0.587, 0.114, 0, 0
0.299, 0.587, 0.114, 0, 0
0.299, 0.587, 0.114, 0, 0
0, 0, 0, 1, 0"/>
</filter>
<filter id="achromatomaly">
<feColorMatrix
in="SourceGraphic"
type="matrix"
values="0.618, 0.320, 0.062, 0, 0
0.163, 0.775, 0.062, 0, 0
0.163, 0.320, 0.516, 0, 0
0, 0, 0, 1, 0"/>
</filter>
</defs>
</svg>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-42634383-3', 'auto');
ga('send', 'pageview');
</script>
<script src="scripts/vue.min.js"></script>
<script src="scripts/main.js"></script>
</body>
</html>