-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
1795 lines (1731 loc) · 83.2 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
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>FOCUS - Les bases pour styler vos applications</title>
<meta name="description" content="Formation destinée à pousser les bonnes pratiques CSS/SASS pour des développements">
<meta name="author" content="Thomas GALLON">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui">
<link rel="stylesheet" href="css/reveal.css">
<link rel="stylesheet" href="css/theme/moon.css" id="theme">
<!-- Code syntax highlighting -->
<link rel="stylesheet" href="lib/css/zenburn.css">
<!-- MD icons -->
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<!-- Printing and PDF exports -->
<script>
var link = document.createElement( 'link' );
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = window.location.search.match( /print-pdf/gi ) ? 'css/print/pdf.css' : 'css/print/paper.css';
document.getElementsByTagName( 'head' )[0].appendChild( link );
</script>
<style>
.inline {
display: flex;
}
.inline > div {
flex: 1;
}
.semantic-sample {
font-size: 18px !important;
}
.semantic-sample strong, .semantic-sample b, .semantic-sample em, .semantic-sample i, .semantic-sample u {
color:#78BAE6;
}
table tr td code {
color: white;
}
</style>
<!--[if lt IE 9]>
<script src="lib/js/html5shiv.js"></script>
<![endif]-->
</head>
<body>
<div class="reveal">
<!-- Any section element inside of this container is displayed as a slide -->
<div class="slides">
<section>
<section data-markdown>
# Styles
### Les bases pour styler vos applications
![FOCUS](./images/logo-focus.png)
</section>
<section data-markdown>
# Sommaire
* Rappel sur les bases du css
* Quelques infos sur SASS
* Get Material Design Lite
* Quelques bonnes pratiques pour styler vos projets
</section>
</section>
<section>
<h1>Balises sémantiques</h1>
<img src="./images/semantic.png" style="height:200px;" />
<pre style="font-size:14px;width:100%">
<code style="html">
<p>Lorem ipsum <strong>dolor</strong> sit amet, consectetur adipiscing <b>elit</b>. Vestibulum at molestie risus.
Etiam nec est congue, <em>accumsan</em> sapien quis, viverra justo. Class <u>aptent</u>
taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.
Aliquam in malesuada felis. Sed <i>laoreet</i> velit velit, eget dictum nibh suscipit vel.</p>
</code>
</pre>
<p class="semantic-sample">
Lorem ipsum <strong>dolor</strong> sit amet, consectetur adipiscing <b>elit</b>. Vestibulum at molestie risus.
Etiam nec est congue, <em>accumsan</em> sapien quis, viverra justo. Class <u>aptent</u> taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.
Aliquam in malesuada felis. Sed <i>laoreet</i> velit velit, eget dictum nibh suscipit vel.
</p>
</section>
<section data-transition="slide" data-background="#4d7e65" data-background-transition="zoom" style="color:black;">
<section>
<h1>Importez vos styles</h1>
<ul>
<li>au sein des pages HTML</li>
<li>dans des feuilles de style</li>
<li>de manière conditionnelle</li>
</ul>
</section>
<section>
<h1 style="font-size:68px;">Au sein des pages</h1>
<ul style="font-size:22px;">
<li>Import de feuille de style</li>
<li>Embebed style <i class="material-icons" style="color:red;font-size:20px;">error_outline</i></li>
<li>Inline style <i class="material-icons" style="color:red;font-size:20px;">error_outline</i></li>
</ul>
<pre style="font-size:14px;width:100%">
<code class='html'>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Application de démo</title>
<link rel="icon" type="image/png" href="focus.png" />
<link rel="stylesheet" href="./styles/mes-styles.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Roboto:300,400,500,700" type="text/css">
<style>
body {
padding:0;
margin:0;
}
</style>
<!--[if IE 7]><link rel="stylesheet" type="text/css" href="screen-ie7.css" /><![endif]-->
</head>
<body style="border:1px solid red;">
// le contenu de la page
</body>
</html>
</code>
</pre>
<!--
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Application de démo</title>
<link rel="icon" type="image/png" href="focus.png" />
<link rel="stylesheet" href="./styles/mes-styles.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Roboto:300,400,500,700" type="text/css">
<style>
body {
padding:0;
margin:0;
}
</style>
</head>
<body style="border:1px solid red;">
// le contenu de la page
</body>
</html>
-->
</section>
<section>
<h1 style="font-size:84px;">Au sein des feuilles de style</h1>
<pre>
<code class="css">
@import url('/Content/header.css');
footer {
background-color:green;
}
</code>
</pre>
</section>
<section>
<h1 style="font-size:74px;">Styles conditionnels</h1>
<div style="display:flex; align-items:center;">
<div style="width:65%;">
<pre align="left" style="font-size:14px;width:100%;">
// Conditional-CSS syntax examples
[if IE] - Used if the browser is IE
[if ! Opera] - Used if the browser is not Opera
[if IE 5] - Used if browser is IE 5
[if lte IE 6] - Used if the browser is IE 6 or less (IE 5, IE 4 etc)
[if ! gt IE 6] - Same effect as the previous statement, if not greater than IE 6
</pre>
<pre style="font-size:14px;width:100%">
<code style="css">
[if IE].container {
height: 100%;
width: 100%;
text-align: center;
line-height: 2em;
[if gte IE 7]background: url('ie7.png') no-repeat center center;
[if lte IE 6]background: url('ie.jpg') no-repeat center center;
}
</code>
</pre>
</div>
<div style="width:35%;">
<img src="images/giphy/your-style.gif" />
</div>
</div>
<a href="http://www.conditional-css.com/usage" style="color:blue;">http://www.conditional-css.com/usage</a>
</section>
</section>
<section data-transition="slide" data-background="#7BAFC6" data-background-transition="zoom" style="color:black;">
<section>
<h1>Sélecteur CSS</h1>
<pre style="font-size:16px;">
<code class="html">
<p>Les <span class="carotte">carottes</span> sont cuites.</p>
<div>Les <span class="carotte">carottes</span> sont cuites.</div>
</code>
</pre>
<pre style="font-size:16px;">
<code class="css">
p .carotte {
color: orange;
text-decoration: underline;
font-style: italic;
}
</code>
</pre>
<blockquote style="font-size:18px;">
<p>Les <span style="color:orange;text-decoration:underline;font-style:italic;">carottes</span> sont cuites.</p>
<div>Les <span>carottes</span> sont cuites.</div>
</blockquote>
</section>
<section>
<h1 style="font-size:82px;">Elémentaires</h1>
<table style="font-size:18px;width:100%;">
<colgroup>
<col width="*">
<col width="140px">
<col width="*">
<col width="110px">
</colgroup>
<thead>
<tr>
<th></th>
<th>Pattern</th>
<th>Meaning</th>
<th>CSS level</th>
</tr>
</thead>
<tbody>
<tr>
<td align="center"><i class="material-icons" style="color:red;">warning</i></td>
<td><code>*</code></td>
<td>Any element</td>
<td align="center">2</td>
</tr>
<tr>
<td align="center"></td>
<td><code>E</code></td>
<td>An element of type E</td>
<td align="center">1</td>
</tr>
<tr>
<td align="center"></td>
<td><code>E.warning</code></td>
<td>An E element whose class attribute is "warning"</td>
<td align="center">1</td>
</tr>
<tr>
<td align="center"></td>
<td><code>E#myId</code></td>
<td>An E element with ID equal to "myId"</td>
<td align="center">1</td>
</tr>
</tbody>
</table>
<pre style="font-size:16px;">
<code class="html">
<p>Paragraphe</p>
<p id="bleu">Paragraphe bleu</p>
</code>
</pre>
<pre style="font-size:16px;">
<code class="css">
p {
color: green;
}
p#bleu {
color: blue;
}
</code>
</pre>
</section>
<section>
<h1 style="font-size:82px;">Combinaisons</h1>
<table style="font-size:18px;width:100%;">
<colgroup>
<col width="*">
<col width="200px">
<col width="*">
<col width="50px">
</colgroup>
<thead>
<tr>
<th></th>
<th>Pattern</th>
<th>Meaning</th>
<th>CSS level</th>
</tr>
</thead>
<tbody>
<tr>
<td align="center"></td>
<td><code>E F</code></td>
<td>An F element descendant of an E element</td>
<td align="center">1</td>
</tr>
<tr>
<td align="center"></td>
<td><code>E > F</code></td>
<td>An F element child of an E element</td>
<td align="center">2</td>
</tr>
<tr>
<td align="center"></td>
<td><code>E + F</code></td>
<td>An F element immediately preceded by an E element</td>
<td align="center">2</td>
</tr>
<tr>
<td align="center"></td>
<td><code>E ~ F</code></td>
<td>An F element preceded by an E element</td>
<td align="center">3</td>
</tr>
</tbody>
</table>
<pre style="font-size:16px;">
<code class="html">
<div>
<span>Hey !</span>
<p>Les carottes sont <span>cuites</span></p>
</div>
</code>
</pre>
<pre style="font-size:16px;">
<code class="css">
div > span {
color: red;
}
</code>
</pre>
</section>
<section>
<h1 style="font-size:82px;">Sur attributs</h1>
<table style="font-size:18px;width:100%;">
<colgroup>
<col width="*">
<col width="160px">
<col width="*">
<col width="50px">
</colgroup>
<thead>
<tr>
<th></th>
<th>Pattern</th>
<th>Meaning</th>
<th>CSS level</th>
</tr>
</thead>
<tbody>
<tr>
<td align="center"></td>
<td><code>E[foo]</code></td>
<td>an E element with a "foo" attribute</td>
<td align="center">2</td>
</tr>
<tr>
<td align="center"></td>
<td><code>E[foo="bar"]</code></td>
<td>an E element whose "foo" attribute value is exactly equal to "bar"</td>
<td align="center">2</td>
</tr>
<tr>
<td align="center"></td>
<td><code>E[foo~="bar"]</code></td>
<td>an E element whose "foo" attribute value is a list of whitespace-separated values, one of which is exactly equal to "bar"</td>
<td align="center">2</td>
</tr>
<tr>
<td align="center"></td>
<td><code>E[foo^="bar"]</code></td>
<td>an E element whose "foo" attribute value begins exactly with the string "bar"</td>
<td align="center">3</td>
</tr>
<tr>
<td align="center"></td>
<td><code>E[foo$="bar"]</code></td>
<td>an E element whose "foo" attribute value ends exactly with the string "bar"</td>
<td align="center">3</td>
</tr>
<tr>
<td align="center"></td>
<td><code>E[foo*="bar"]</code></td>
<td>an E element whose "foo" attribute value contains the substring "bar"</td>
<td align="center">3</td>
</tr>
<tr>
<td align="center"></td>
<td><code>E[foo|="en"]</code></td>
<td>an E element whose "foo" attribute has a hyphen-separated list of values beginning (from the left) with "en"</td>
<td align="center">2</td>
</tr>
</tbody>
</table>
<pre>
<code class="css">
table tbody tr td[align="center"] {
text-align:center;
}
</code>
</pre>
</section>
<section>
<h1 style="font-size:82px;">Pseudo-classes (1/3)</h1>
<blockquote align="left" style="font-size:26px;width:100%;">Expressions permettant classifier les éléments sur des caractéristiques qui ne peuvent pas être déduites du DOM</blockquote>
<table style="font-size:18px;width:100%;">
<colgroup>
<col width="*">
<col width="230px">
<col width="*">
<col width="50px">
</colgroup>
<thead>
<tr>
<th></th>
<th>Pattern</th>
<th>Meaning</th>
<th>CSS level</th>
</tr>
</thead>
<tbody>
<tr>
<td align="center"></td>
<td><code>E:root</code></td>
<td>an E element, root of the document</td>
<td align="center">3</td>
</tr>
<tr>
<td align="center"></td>
<td><code>E:nth-child(n)</code></td>
<td>an E element, the n-th child of its parent</td>
<td align="center">3</td>
</tr>
<tr>
<td align="center"></td>
<td><code>E:nth-last-child(n)</code></td>
<td>an E element, the n-th child of its parent, counting from the last one</td>
<td align="center">3</td>
</tr>
<tr>
<td align="center"></td>
<td><code>E:nth-of-type(n)</code></td>
<td>an E element, the n-th sibling of its type</td>
<td align="center">3</td>
</tr>
<tr>
<td align="center"></td>
<td><code>E:nth-last-of-type(n)</code></td>
<td>an E element, the n-th sibling of its type, counting from the last one</td>
<td align="center">3</td>
</tr>
</tbody>
</table>
</section>
<section>
<h1 style="font-size:82px;">Pseudo-classes (2/3)</h1>
<table style="font-size:18px;width:100%;">
<colgroup>
<col width="*">
<col width="200px">
<col width="*">
<col width="50px">
</colgroup>
<thead>
<tr>
<th></th>
<th>Pattern</th>
<th>Meaning</th>
<th>CSS level</th>
</tr>
</thead>
<tbody>
<tr>
<td align="center"></td>
<td><code>E:first-child</code></td>
<td>an E element, first child of its parent</td>
<td align="center">2</td>
</tr>
<tr>
<td align="center"></td>
<td><code>E:last-child</code></td>
<td>an E element, last child of its parent</td>
<td align="center">3</td>
</tr>
<tr>
<td align="center"></td>
<td><code>E:first-of-type</code></td>
<td>an E element, first sibling of its type</td>
<td align="center">3</td>
</tr>
<tr>
<td align="center"></td>
<td><code>E:last-of-type</code></td>
<td>an E element, last sibling of its type</td>
<td align="center">3</td>
</tr>
<tr>
<td align="center"></td>
<td><code>E:only-child</code></td>
<td>an E element, only child of its parent</td>
<td align="center">3</td>
</tr>
<tr>
<td align="center"></td>
<td><code>E:only-of-type</code></td>
<td>an E element, only sibling of its type</td>
<td align="center">3</td>
</tr>
<tr>
<td align="center"></td>
<td><code>E:empty</code></td>
<td>an E element that has no children (including text nodes)</td>
<td align="center">3</td>
</tr>
</tbody>
</table>
</section>
<section>
<h1 style="font-size:82px;">Pseudo-classes (3/3)</h1>
<table style="font-size:18px;width:100%;">
<colgroup>
<col width="*">
<col width="160px">
<col width="*">
<col width="110px">
</colgroup>
<thead>
<tr>
<th></th>
<th>Pattern</th>
<th>Meaning</th>
<th>CSS level</th>
</tr>
</thead>
<tbody>
<tr>
<td align="center"></td>
<td><code>E:link</code></td>
<td>an E element being the source anchor of a hyperlink of which the target is not yet visited (:link) or already visited (:visited)</td>
<td align="center">1</td>
</tr>
<tr>
<td align="center"></td>
<td><code>E:visited</code></td>
<td>an E element during certain user actions</td>
<td align="center">1</td>
</tr>
<tr>
<td align="center"></td>
<td><code>E:active</code></td>
<td>an E element during certain user actions</td>
<td align="center">1 and 2</td>
</tr>
<tr>
<td align="center"></td>
<td><code>E:hover</code></td>
<td>an E element during certain user actions</td>
<td align="center">1 and 2</td>
</tr>
<tr>
<td align="center"></td>
<td><code>E:focus</code></td>
<td>an E element during certain user actions</td>
<td align="center">1 and 2</td>
</tr>
<tr>
<td align="center"></td>
<td><code>E:target</code></td>
<td>an E element being the target of the referring URI</td>
<td align="center">3</td>
</tr>
<tr>
<td align="center"></td>
<td><code>E:lang(fr)</code></td>
<td>an element of type E in language "fr" (the document language specifies how language is determined)</td>
<td align="center">2</td>
</tr>
<tr>
<td align="center"></td>
<td><code>E:enabled</code></td>
<td>a user interface element E which is enabled or disabled</td>
<td align="center">3</td>
</tr>
<tr>
<td align="center"></td>
<td><code>E:disabled</code></td>
<td>a user interface element E which is enabled or disabled</td>
<td align="center">3</td>
</tr>
<tr>
<td align="center"></td>
<td><code>E:checked</code></td>
<td>a user interface element E which is checked (for instance a radio-button or checkbox)</td>
<td align="center">3</td>
</tr>
<tr>
<td align="center"></td>
<td><code>E:not(s)</code></td>
<td>an E element that does not match simple selector s</td>
<td align="center">3</td>
</tr>
</tbody>
</table>
</section>
<section>
<h1 style="font-size:82px;">Pseudo-éléments</h1>
<blockquote align="left" style="font-size:26px;width:100%;">Pseudo-éléments : expressions offrant l’accès à de l’information, du contenu, qui n’est pas directement accessible via le DOM</blockquote>
<table style="font-size:18px;width:100%;">
<colgroup>
<col width="*">
<col width="200px">
<col width="*">
<col width="50px">
</colgroup>
<thead>
<tr>
<th></th>
<th>Pattern</th>
<th>Meaning</th>
<th>CSS level</th>
</tr>
</thead>
<tbody>
<tr>
<td align="center"></td>
<td><code>E::first-line</code></td>
<td>the first formatted line of an E element</td>
<td>1</td>
</tr>
<tr>
<td align="center"></td>
<td><code>E::first-letter</code></td>
<td>the first formatted letter of an E element</td>
<td>1</td>
</tr>
<tr>
<td align="center"></td>
<td><code>E::before</code></td>
<td>generated content before an E element</td>
<td>2</td>
</tr>
<tr>
<td align="center"></td>
<td><code>E::after</code></td>
<td>generated content after an E element</td>
<td>2</td>
</tr>
</tbody>
</table>
</section>
</section>
<section data-transition="slide" data-background="#C67B9E" data-background-transition="zoom" style="color:black;">
<section>
<h1>Priorité des sélecteurs</h1>
</section>
<section>
<h1 style="font-size:82px;">Précédence</h1>
<blockquote>
<table style="font-size:20px;">
<tbody>
<tr>
<td>A</td>
<td>égal à 1 si l'attribut "style" est défini, 0 sinon</td>
</tr>
<tr>
<td>B</td>
<td>nombre d'ID utilisés dans le sélecteur</td>
</tr>
<tr>
<td>C</td>
<td>nombre de classes et de pseudo-classes dans le sélecteur</td>
</tr>
<tr>
<td>D</td>
<td>nombre de nom d'éléments et pseudo-éléments dans le sélecteur</td>
</tr>
</tbody>
</table>
</blockquote>
<table style="font-size:18px">
<colgroup>
<col width="300px" />
<col width="70px" />
<col width="70px" />
<col width="70px" />
<col width="70px" />
</colgroup>
<thead>
<tr>
<th>Sélecteur</th>
<th align="center">A</th>
<th align="center">B</th>
<th align="center">C</th>
<th align="center">D</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>* {}</code></td>
<td align="center" class="fragment" data-fragment-index="0">0</td>
<td align="center" class="fragment" data-fragment-index="0">0</td>
<td align="center" class="fragment" data-fragment-index="0">0</td>
<td align="center" class="fragment" data-fragment-index="0">0</td>
</tr>
<tr>
<td><code>li {}</code></td>
<td align="center" class="fragment" data-fragment-index="1">0</td>
<td align="center" class="fragment" data-fragment-index="1">0</td>
<td align="center" class="fragment" data-fragment-index="1">0</td>
<td align="center" class="fragment" data-fragment-index="1" style="color:#00FF7C;">1</td>
</tr>
<tr>
<td><code>li:first-line {}</code></td>
<td align="center" class="fragment" data-fragment-index="2">0</td>
<td align="center" class="fragment" data-fragment-index="2">0</td>
<td align="center" class="fragment" data-fragment-index="2">0</td>
<td align="center" class="fragment" data-fragment-index="2" style="color:#00FF7C;">2</td>
</tr>
<tr>
<td><code>ul li {}</code></td>
<td align="center" class="fragment" data-fragment-index="3">0</td>
<td align="center" class="fragment" data-fragment-index="3">0</td>
<td align="center" class="fragment" data-fragment-index="3">0</td>
<td align="center" class="fragment" data-fragment-index="3" style="color:#00FF7C;">2</td>
</tr>
<tr>
<td><code>ul ol+li {}</code></td>
<td align="center" class="fragment" data-fragment-index="5">0</td>
<td align="center" class="fragment" data-fragment-index="5">0</td>
<td align="center" class="fragment" data-fragment-index="5">0</td>
<td align="center" class="fragment" data-fragment-index="5" style="color:#00FF7C;">3</td>
</tr>
<tr>
<td><code>h1 + *[rel="up"] {}</code></td>
<td align="center" class="fragment" data-fragment-index="6">0</td>
<td align="center" class="fragment" data-fragment-index="6">0</td>
<td align="center" class="fragment" data-fragment-index="6" style="color:#00FF7C;">1</td>
<td align="center" class="fragment" data-fragment-index="6" style="color:#00FF7C;">1</td>
</tr>
<tr>
<td><code>ul ol li.red {}</code></td>
<td align="center" class="fragment" data-fragment-index="7">0</td>
<td align="center" class="fragment" data-fragment-index="7">0</td>
<td align="center" class="fragment" data-fragment-index="7" style="color:#00FF7C;">1</td>
<td align="center" class="fragment" data-fragment-index="7" style="color:#00FF7C;">3</td>
</tr>
<tr>
<td><code>li.red.level {}</code></td>
<td align="center" class="fragment" data-fragment-index="8">0</td>
<td align="center" class="fragment" data-fragment-index="8">0</td>
<td align="center" class="fragment" data-fragment-index="8" style="color:#00FF7C;">2</td>
<td align="center" class="fragment" data-fragment-index="8" style="color:#00FF7C;">1</td>
</tr>
<tr>
<td><code>#x34y {}</code></td>
<td align="center" class="fragment" data-fragment-index="9">0</td>
<td align="center" class="fragment" data-fragment-index="9" style="color:#00FF7C;">1</td>
<td align="center" class="fragment" data-fragment-index="9">0</td>
<td align="center" class="fragment" data-fragment-index="9">0</td>
</tr>
<tr>
<td><code>style="color:red" {}</code></td>
<td align="center" class="fragment" data-fragment-index="10" style="color:#00FF7C;">1</td>
<td align="center" class="fragment" data-fragment-index="10">0</td>
<td align="center" class="fragment" data-fragment-index="10">0</td>
<td align="center" class="fragment" data-fragment-index="10">0</td>
</tr>
</tbody>
</table>
</section>
<section>
<h1>Priorité</h1>
<div align="left">En cas de conflit dans les styles :</div>
<blockquote style="width:100%;">
<ol>
<li><code>!important</code></li>
<li>Priorité / Précédence</li>
<li>Ordre textuel</li>
</ol>
<blockquote>
</section>
<section data-markdown>
# Priorité
Les feuilles de style sont interprétées dans l'ordre suivant :
1. Feuille de style du navigateur
2. Feuille de style de l’utilisateur
3. Feuille de style du site internet
</section>
<section data-markdown>
# Ordre d'évaluation
1. Feuille de style du navigateur
2. Feuille de style de l’utilisateur
3. Feuille de style du site internet
4. `!important` du site internet
5. `!important` de l’utilisateur
</section>
</section>
<section>
<section data-markdown>
# Box model
![Box model](./images/box-model.png)
</section>
</section>
<section>
<section data-markdown>
# Focus sur des notions importantes du CSS
</section>
</section>
<section>
<section>
<h1>position dans le flux</h1>
<blockquote align="left" style="font-size:24px;width:100%;">
<div>Définir le positionnement d'un élément par rapport :</div>
<ul>
<li>aux limites de la zone d'affichage</li>
<li>aux limites de son conteneur</li>
<li>au flux HTML</li>
</ul>
</blockquote>
<pre>
<code class="css">
E {
position: static | relative | absolute | fixed;
}
</code>
</pre>
</section>
<section>
<h1 style="font-size:78px"><code>{position: static}</code></h1>
<blockquote align="left" style="font-size:24px;width:100%;">
<div>C'est la valeur par défaut affectée à chaque éléments du flux HTML.</div>
<div>L’élément est affiché selon l’ordre du flux et de conteneur.</div>
</blockquote>
<a href="http://codepen.io/anon/pen/PPyXeG" target="_blank">http://codepen.io/anon/pen/PPyXeG</a>
</section>
<section>
<h1 style="font-size:78px"><code>{position: relative}</code></h1>
<blockquote align="left" style="font-size:24px;width:100%;">
<div>Affiche l’élément par rapport à son conteneur parent.</div>
<div>L’élément est affiché selon l’ordre du flux et de conteneur.</div>
</blockquote>
<a href="http://codepen.io/Tommass/pen/PPyVEQ" target="_blank">http://codepen.io/Tommass/pen/PPyVEQ</a>
</section>
<section>
<h1 style="font-size:78px"><code>{position: absolute}</code></h1>
<blockquote align="left" style="font-size:24px;width:100%;">
<div>L'élement est retiré du flux.</div>
<div>Il se positionne :</div>
<ul>
<li>Au niveau du conteneur parent ayant une position <code style="color:red;">relative</code> ou <code style="color:red;">absolute</code></li>
<li>A defaut, par rapport au conteneur principal : le navigateur</li>
</ul>
</blockquote>
<div style="display:flex;">
<div align="left" style="font-size:22px; width:50%;">
<div>Exemple d'utilisation :</div>
<ul>
<li>footer</li>
<li>template de pages avec colonnes</li>
</ul>
</div>
<div align="right" style="width:50%;">
<img src="./images/template-absolute.png" style="height:200px;" />
</div>
</div>
<a href="http://codepen.io/Tommass/pen/QjZopW" target="_blank">http://codepen.io/Tommass/pen/QjZopW</a>
</section>
<section>
<h1 style="font-size:78px"><code>{position: fixed}</code></h1>
<blockquote align="left" style="font-size:24px;width:100%;">
<ul>
<li>Le contenu est retiré du flux</li>
<li>Il se positionne toujours par rapport à la partie visible du navigateur</li>
<li>Sa position est fixe à l'écran, le scroll n’agit pas sur l’élément qui reste toujours au même endroit</li>
</ul>
</blockquote>
<div align="left" style="font-size:22px;">
<div>Exemple d'utilisation</div>
<ul>
<li>Header fixe (comme sur facebook, twitter, focus, ...)</li>
<li>Footer fixe</li>
</ul>
</div>
<a href="http://codepen.io/Tommass/pen/GpYeZX" target="_blank">http://codepen.io/Tommass/pen/GpYeZX</a>
</section>
</section>
<section>
<h1>Floating</h1>
<section>
<br/>
<br/>
<br/>
<img src="./images/float.png" style="height:200px;" />
<blockquote align="left" style="font-size:26px;width:100%">
<li>Empile les éléments de droite à gauche ou de gauche à droite</li>
<li>Permet aux éléments proches de venir s’empiler autour</li>
<li>Ne prend pas de place dans son conteneur parent</li>
<li>Influence le contenu</li>
</blockquote>
<a href="http://codepen.io/Tommass/pen/EVdJdr" target="_blank">http://codepen.io/Tommass/pen/EVdJdr</a>
</section>
<section>
<div><i class="material-icons" style="font-size:74px; color:red;">warning</i></div>
<blockquote style="width:100%">
<ul>
<li>N’est pas considéré par le conteneur</li>
<li>Est considéré par ses frangins...</li>
</ul>
</blockquote>
<a href="http://codepen.io/Tommass/pen/XmxQQO" target="_blank">http://codepen.io/Tommass/pen/XmxQQO</a>
</section>
<section>
<br/>
<br/>
<br/>
<blockquote style="width:100%">
<li>Peut-être utilisé pour le template d'une page</li>
</blockquote>
<img src="./images/template-float.png" style="height:200px;" />
<br/>
<a href="http://codepen.io/Tommass/pen/ZbqZNq" target="_blank">http://codepen.io/Tommass/pen/ZbqZNq</a>
<br/>
<p style="font-size:25px;text-align:left;">
<i class="material-icons" style="color:red;font-size:20px;">error_outline</i> Nouvelle propriété <code style="color:white;">display:flex</code> introduite par CSS3.<br/>
<i class="material-icons" style="color:red;font-size:20px;">error_outline</i> Plutôt utiliser <code style="color:white;">position:absolute</code>.
</p>
</section>
</section>
<section>
<section>
<h1 style="font-size:74px;">Flexible box</h1>
<blockquote>
Nouvelle propriété CSS 3 !
</blockquote>
<img src="./images/giphy/monica1.gif" style="height:200px;" />
<pre>
<code style="css">
E {
display:flex;
}
</code>
</pre>
</section>
<section>
<h1 style="font-size:74px;">Flexible box</h1>
<div style="display:flex;align-items:center;">
<div style="width:50%;">
<blockquote align="left" style="width:100%;font-size:22px;">
<div>Permet dans de jouer plus facilement avec</div>
<ul>
<li>le positionnement</li>
<li>l’orientation</li>
<li>l’ordre d’affichage</li>
</ul>
<div>Sans avoir à toucher au code HTML</div>
</blockquote>
<blockquote align="left" style="width:100%;font-size:22px;">
<div>Remplace la combinaison des propriétés</div>
<ul>
<li><code>position</code></li>
<li><code>display</code></li>
<li><code>float</code></li>
</ul>
</blockquote>
</div>
<div style="width:50%;padding:0 20px;">
<img src="./images/flex.png" />
</div>
</div>
<img src="./images/giphy/monica2.gif" style="height:200px;" />
</section>
<section>
<h1 style="font-size:74px;">principales propriétés</h1>
<br />