-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathstyle.css
4762 lines (4378 loc) · 93.9 KB
/
style.css
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
/* All variables defined in this file have the same name as variables in Bootstrap 4. */
@import url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/fontawesome.min.css");
@import url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/brands.min.css");
@import url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/solid.min.css");
@import url("https://unpkg.com/tippy.js@6/themes/light.css");
@import url("https://unpkg.com/tippy.js@6/themes/light-border.css");
@import url("https://unpkg.com/tippy.js@6/themes/material.css");
@import url("https://unpkg.com/tippy.js@6/themes/translucent.css");
/* usage (from Font Awesome documentation):
* in HTML: solid: <i class="fas fa-camera"></i>
* brands: <i class="fab fa-facebook"></i>
* in CSS:
* HTML part: <button class="class1"></button> (button for example)
* CSS part: solid: .class1::before { font-family: "Font Awesome 5 Free"; content: "\f030"; }
* brands: .class1::before { font-family: "Font Awesome 5 Brands"; content: "\f09a"; }
*
* icon modifier classes:
* change size: fa-xs 0.75em
fa-sm 0.875em
fa-lg 1.33em also applies vertical-align: -25%
fa-2x 2em
... ...
fa-10x 10em
* rotate/flip: fa-rotate-{90|180|270}
* fa-flip-{horizontal|vertical|both}
* animate: fa-spin
* fa-pulse
* see https://fontawesome.com/how-to-use/on-the-web/styling/animating-icons
*/
/**
* Creates an isosceles triangle pointing left, right, down, or up, with the given: length, half the width and the color.
*
* Example: @include iw-triangle-left(16px, 8px, blue);
* Usage:
* - can be included in an element, or in a ::before/::after pseudo-element (then add content: "";)
* - can be positioned
* How it works: https://www.youtube.com/watch?v=4cXgXZ3Tf0s
*/
/**
* Creates a circle with the given color and the size.
* If size isn't given, it is like if the width and height properties weren't set, thus the circle size
* comes from its content.
* Example: @include iw-circle(blue, 16px);
* Usage:
* - can be included in an element, or in a ::before/::after pseudo-element (then add: content: "";)
* - can be positioned
*/
/**
* Behaves like iw-circle mixin, but additionally prepares the circle for displaying a single character in it (Font Awesome icon,
* leter, digit etc.) by centering this character.
*
* Usage:
* <i class="inline fab fa-facebook"></i>
*
* .inline.fab { @include iw-circled-sign(lightgreen, 96px);
* // vertical-align: middle; // optional
* // font-size: $size/2; // optional, can be default or for example set by fa-4x for Font Awesome icon
* }
* Source: https://stackoverflow.com/questions/41532908/make-font-awesome-icons-in-a-circle-border-with-right-11-ratio
* This centering method has been used by Brad Traversy in the "Modern HTML & CSS From The Beginning (Including Sass)" course
* https://www.udemy.com/course/modern-html-css-from-the-beginning/
*/
/**
* Use flex to center the child(ren) of the current element along both axes: the main axis and the cross axis.
* After calling "@include iw-flex-center();":
* - optionally set the height and the width of the current element
* - optionally set "text-align: center;" to center text inside <p>, <h1> etc.
* - optionally set "flex-direction: row;" to lay out children horizontally
* - optionally set "flex: none;" on a flex item to not allow to shrink this child along the main axis
* Todo: add $min argument similarly as in iw-flex-scatter/iw-flex-equal($min)
*/
/**
* Uses flex to lay out the children of the current element vertically by default, and horizontally on the given screen and larger.
* If there is a free space, scatters the children along the main axis and centers them along the cross axis.
*/
/**
* Uses flex to lay out the children of the current element vertically by default, and horizontally on the given screen and larger.
* If there is enough free space, the children will have the same length along the main axis (by using "flex: 1;").
* Note: The children have "flex-grow: 1", so justify-content has no effect, and iw-flex-center/scatter() should not be used.
*/
/**
* A simple grid view with the given columns on the given screen and larger [, and the given gap between columns and rows]. On smaller
* screens, $cols defaults to "none", i.e. as if there were no grid, or the grid had only one column with 1fr/auto width [1], because
* on smaller screens one column usually looks the best.
* To obtain different grid layouts for different resolutions you can call the iw-grid-cols() mixin several times with different
* $min arguments in one CSS rule, for example:
* .class1 { @include iw-grid-cols( 768px, 1fr 1fr, 1rem);
* @include iw-grid-cols(1200px, 1fr 1fr 1fr, 1rem); }
*
* [1] If there is no grid-template-areas property, there is no explicit grid. By default, grid-auto-columns is auto. One auto column
* behaves as if there were no grid.
*
* Examples (with description for screens at least 768px wide):
* @include iw-grid-cols(768px, auto 1fr); - 2 columns: the 1st column width is the width of the longest element in this column
* @include iw-grid-cols(768px, fit-content(350px) 1fr); - 2 columns: the 1st column width is the width of the longest element in this column, but no more than 350px
* @include iw-grid-cols(768px, 1fr 2fr); - 2 columns with widths: 33.3% and 66.6%
* @include iw-grid-cols(768px, 1fr 1fr 1fr); - 3 columns with equal width
* @include iw-grid-cols(768px, auto auto auto auto); - todo: check
*
* @include iw-grid-cols(768px, 5fr 2fr, 1.5rem); - with the 1.5rem gap between both rows and columns
* @include iw-grid-cols(768px, 5fr 2fr, 1.5rem 1rem); - with the 1.5rem gap between rows and the 1rem gap between columns
*/
/**
* Creates an overlay over the parent element with the given background color and opacity (less than 1).
* The parent element needs to be positioned (i.e. not static).
* See: https://www.w3schools.com/howto/howto_css_overlay.asp
* Used in "Modern HTML & CSS From The Beginning (Including Sass)" course by Brad Traversy, for example in portfolio website.
*
* Example usage:
* .class1 { position: relative; }
* .class1::after { @include iw-overlay(black, 0.9); }
*/
/**
* Use absolute positioning and the transform property to center the CURRENT element both vertically and horizonatally
* within the closest positioned (i.e. not static) ancestor, if any; or the whole document, otherwise.
* Of course, the current element is removed from the normal document flow, so no space is created for the current
* element in the page layout.
*/
.iw-alert {
margin: 0.4em 0;
border: 1px solid transparent;
border-radius: 0.25rem;
padding: 0.75em;
}
/* Color styles of alert. Colors are the same as in Bootstrap, e.g.: .iw-alert--{success|warning|...} */
.iw-alert--primary {
border-color: #b8daff;
background-color: #cce5ff;
color: #004085;
}
.iw-alert--secondary {
border-color: #d6d8db;
background-color: #e2e3e5;
color: #383d41;
}
.iw-alert--success {
border-color: #c3e6cb;
background-color: #d4edda;
color: #155724;
}
.iw-alert--warning {
border-color: #ffeeba;
background-color: #fff3cd;
color: #856404;
}
.iw-alert--danger {
border-color: #f5c6cb;
background-color: #f8d7da;
color: #721c24;
}
.iw-alert--info {
border-color: #bee5eb;
background-color: #d1ecf1;
color: #0c5460;
}
.iw-alert--light {
border-color: #fdfdfe;
background-color: #fefefe;
color: #818182;
}
.iw-alert--dark {
border-color: #c6c8ca;
background-color: #d6d8d9;
color: #1b1e21;
}
.iw-alert__dismiss-button {
float: right;
position: relative;
top: -6px;
opacity: 50%;
border: none;
background: transparent;
color: black;
font: 1.7rem Arial, sans-serif;
cursor: pointer;
}
.iw-alert__dismiss-button:hover {
opacity: 75%;
color: black;
}
.iw-btn {
display: inline-block;
border: 1px solid transparent;
border-radius: 0.25rem;
background-color: #e9ecef;
padding: 0.375em 0.75em;
color: #212529;
font: inherit;
text-decoration: none;
}
.iw-btn:not(:disabled) {
cursor: pointer;
}
.iw-btn:disabled {
opacity: 0.65;
pointer-events: none;
}
.iw-btn:focus {
outline: none;
box-shadow: 0 0 0 0.2em rgba(0, 123, 255, 0.25);
}
.iw-btn::-moz-focus-inner {
border-style: none;
}
.iw-btn--block {
display: block;
width: 100%;
text-align: center;
}
.iw-btn--primary {
border-color: #007bff;
background-color: #007bff;
color: white;
}
.iw-btn--primary:hover, .iw-btn--primary:focus {
border-color: #0062cc;
background-color: #0069d9;
color: white;
}
.iw-btn--primary:focus {
box-shadow: 0 0 0 0.2em rgba(38, 143, 255, 0.5);
}
.iw-btn--secondary {
border-color: #6c757d;
background-color: #6c757d;
color: white;
}
.iw-btn--secondary:hover, .iw-btn--secondary:focus {
border-color: #545b62;
background-color: #5a6268;
color: white;
}
.iw-btn--secondary:focus {
box-shadow: 0 0 0 0.2em rgba(130, 138, 145, 0.5);
}
.iw-btn--success {
border-color: #28a745;
background-color: #28a745;
color: white;
}
.iw-btn--success:hover, .iw-btn--success:focus {
border-color: #1e7e34;
background-color: #218838;
color: white;
}
.iw-btn--success:focus {
box-shadow: 0 0 0 0.2em rgba(72, 180, 97, 0.5);
}
.iw-btn--warning {
border-color: #ffc107;
background-color: #ffc107;
color: #212529;
}
.iw-btn--warning:hover, .iw-btn--warning:focus {
border-color: #d39e00;
background-color: #e0a800;
color: #212529;
}
.iw-btn--warning:focus {
box-shadow: 0 0 0 0.2em rgba(222, 170, 12, 0.5);
}
.iw-btn--danger {
border-color: #dc3545;
background-color: #dc3545;
color: white;
}
.iw-btn--danger:hover, .iw-btn--danger:focus {
border-color: #bd2130;
background-color: #c82333;
color: white;
}
.iw-btn--danger:focus {
box-shadow: 0 0 0 0.2em rgba(225, 83, 97, 0.5);
}
.iw-btn--info {
border-color: #17a2b8;
background-color: #17a2b8;
color: white;
}
.iw-btn--info:hover, .iw-btn--info:focus {
border-color: #117a8b;
background-color: #138496;
color: white;
}
.iw-btn--info:focus {
box-shadow: 0 0 0 0.2em rgba(58, 176, 195, 0.5);
}
.iw-btn--light {
border-color: #f8f9fa;
background-color: #f8f9fa;
color: #212529;
}
.iw-btn--light:hover, .iw-btn--light:focus {
border-color: #dae0e5;
background-color: #e2e6ea;
color: #212529;
}
.iw-btn--light:focus {
box-shadow: 0 0 0 0.2em rgba(216, 217, 219, 0.5);
}
.iw-btn--dark {
border-color: #343a40;
background-color: #343a40;
color: white;
}
.iw-btn--dark:hover, .iw-btn--dark:focus {
border-color: #1d2124;
background-color: #23272b;
color: white;
}
.iw-btn--dark:focus {
box-shadow: 0 0 0 0.2em rgba(82, 88, 93, 0.5);
}
.iw-btn--link {
background-color: transparent;
color: #007bff;
text-decoration: none;
}
.iw-btn--link:hover {
color: #0056b3;
text-decoration: underline;
}
.iw-btn--link:focus {
box-shadow: none;
text-decoration: underline;
}
.iw-btn--link:disabled {
color: #6c757d;
}
.iw-btn--lg {
border-radius: 0.3rem;
padding: 0.5rem 1rem;
font-size: 1.25rem;
}
.iw-btn--sm {
border-radius: 0.2rem;
padding: 0.25rem 0.5rem;
font-size: 0.875rem;
}
.iw-carousel {
position: relative;
margin: 1em;
text-align: center;
}
.iw-carousel__inner {
margin: 0 auto;
max-width: 1000px;
}
.iw-carousel__item {
display: none;
margin: 0;
}
.iw-carousel__item.active {
display: block;
}
.iw-carousel__control {
transition: background-color 0.6s;
margin-top: 7px;
border: none;
background-color: rgba(0, 0, 0, 0.4);
padding: 4px 6px;
color: white;
font-size: 18px;
font-weight: bold;
cursor: pointer;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.iw-carousel__control:hover {
background-color: rgba(0, 0, 0, 0.8);
}
.iw-carousel__control--prev {
border-radius: 3px 0 0 3px;
}
.iw-carousel__control--next {
border-radius: 0 3px 3px 0;
}
.iw-carousel__indicators {
display: inline;
padding-left: 0;
}
.iw-carousel__indicators li {
display: inline-block;
transition: background-color 0.6s;
margin: 0 2px;
border-radius: 50%;
background-color: #bbb;
width: 15px;
height: 15px;
cursor: pointer;
}
.iw-carousel__indicators li:hover, .iw-carousel__indicators li.active {
background-color: #717171;
}
.iw-carousel-mul {
box-sizing: content-box;
position: relative;
margin: 1em 0;
border: 1px solid #ced4da;
border-radius: 15px;
background: #f8f9fa;
padding: 10px 40px;
}
.iw-carousel-mul__inner {
overflow: hidden;
}
.iw-carousel-mul__inner ul {
transition: transform 250ms;
margin: 0;
padding: 0;
width: 9999px;
list-style: none;
font-size: 0;
}
.iw-carousel-mul__inner ul li {
display: inline-block;
}
.iw-carousel-mul__inner ul img {
display: block;
}
.iw-carousel-mul__control {
position: absolute;
top: 40%;
display: block;
opacity: 31%;
outline: none;
border: none;
background: transparent;
padding: 0;
color: black;
font-size: 24px;
cursor: pointer;
}
.iw-carousel-mul__control:hover, .iw-carousel-mul__control:focus {
opacity: 50%;
color: black;
}
.iw-carousel-mul__control--prev {
left: 17px;
}
.iw-carousel-mul__control--next {
right: 17px;
}
.iw-carousel-mul__control--prev::before {
font-family: "Font Awesome 5 Free";
content: "\f104";
}
.iw-carousel-mul__control--next::before {
font-family: "Font Awesome 5 Free";
content: "\f105";
}
/**
* Styles :focus, :valid, :invalid, and :checked pseudo-classes of form controls. The :valid, :invalid, and :checked
* are styled only if the submit button has been clicked.
*
* The mixin is included in a block of a form control selector in _iw-form.scss and _iw-form-custom-toggles.scss files.
* The form control selector should start exactly with the .iw-form[--some-modifier] CSS class, because this mixin
* needs to concatenate the .was-validated class to it.
*/
/* stylelint-disable selector-max-compound-selectors */
.iw-form {
margin: 1em 0;
}
.iw-form h1 {
text-align: center;
}
.iw-form fieldset {
border: none;
padding: 0;
}
.iw-form .iw-form__fieldset {
margin: 1.5em 0;
border: 1px solid #409cff;
border-radius: 0.25rem;
background-color: #f8f9fa;
padding: 0.35em 0.75em 0.625em;
}
.iw-form .iw-form__fieldset legend {
border: 1px solid #007bff;
border-radius: 0.25rem;
background-color: #007bff;
padding: 0 0.2em;
color: white;
font-size: 1.17em;
line-height: 1.5;
}
.iw-form .iw-form__fieldset > div {
margin-top: 1em;
}
.iw-form > label,
.iw-form .iw-form__fieldset > div > label {
display: block;
margin-top: 1em;
margin-bottom: 0.1em;
}
.iw-form .iw-btn:not([type=button]) {
margin: 2em 0 1em;
}
.iw-form label.required::after {
color: red;
content: " *";
}
@media (min-width: 992px) {
.iw-form--responsive .iw-form__fieldset {
margin: 1em 0 0;
}
.iw-form--responsive,
.iw-form--responsive .iw-form__fieldset > div {
display: grid;
grid-template-columns: fit-content(350px) 1fr;
gap: 1rem;
}
.iw-form--responsive > label,
.iw-form--responsive .iw-form__fieldset > div > label {
grid-column: 1/span 1;
align-self: center;
margin: 0;
max-width: 400px;
}
.iw-form--responsive > label + *,
.iw-form--responsive .iw-form__fieldset > div > label + * {
grid-column: 2/span 1;
}
.iw-form--responsive > *,
.iw-form--responsive .iw-form__fieldset > div > * {
grid-column: 1/span 2;
margin: 0;
}
.iw-form--responsive > .iw-btn,
.iw-form--responsive .iw-form__fieldset > div > .iw-btn {
justify-self: center;
}
}
/********************* <input> (without radio and checkbox), <textarea>, <select> *********************/
.iw-form__control {
box-sizing: border-box;
border: 1px solid #ced4da;
border-radius: 0.25rem;
padding: 0.375rem 0.75rem;
width: 100%;
color: #495057;
font: inherit;
}
input[type=file].iw-form__control {
background-color: inherit;
}
textarea.iw-form__control {
height: 12.5em;
resize: vertical;
}
.iw-form__control--sm {
border-radius: 0.2rem;
padding: 0.25rem 0.5rem;
height: calc(1.5em + 0.5rem + 2px);
font-size: 0.875rem;
line-height: 1.5;
}
.iw-form__control--lg {
border-radius: 0.3rem;
padding: 0.5rem 1rem;
height: calc(1.5em + 1rem + 2px);
font-size: 1.25rem;
line-height: 1.5;
}
/* ---------- State indicators ---------- */
.iw-form .iw-form__control:focus {
outline: none;
}
.iw-form .iw-form__control:invalid {
outline: none;
box-shadow: none;
}
.iw-form .iw-form__control:focus {
border-color: #409cff;
box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}
.was-validated.iw-form .iw-form__control:valid {
border-color: #28a745;
}
.was-validated.iw-form .iw-form__control:invalid {
border-color: #dc3545;
}
.was-validated.iw-form .iw-form__control:valid:focus {
box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}
.was-validated.iw-form .iw-form__control:invalid:focus {
box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}
.was-validated.iw-form .iw-form__control:valid:checked {
background: rgba(40, 167, 69, 0.5);
}
.was-validated.iw-form .iw-form__control:invalid:checked {
background: rgba(220, 53, 69, 0.5);
}
/********************* Checkboxes and radios *********************/
.iw-form__check {
position: relative;
display: block;
padding-left: 1.25rem;
}
.iw-form__check input {
position: absolute;
margin-left: -1.25rem;
margin-top: 0.3rem;
}
.iw-form__check--inline {
display: inline-flex;
align-items: center;
margin-right: 0.75rem;
padding-left: 0;
}
.iw-form__check--inline input {
position: static;
margin-left: 0;
margin-right: 0.3125rem;
margin-top: 0;
}
.iw-form__check input[disabled] ~ label,
.iw-form__check input:disabled ~ label {
color: #6c757d;
}
.iw-form__check label {
margin-bottom: 0;
}
.iw-form__check:not(.iw-form__check--inline) input.iw-form__switch ~ label {
margin-left: 1.25rem;
}
/* ---------- State indicators ---------- */
.was-validated .iw-form__check input:valid ~ label {
color: #28a745;
}
.was-validated .iw-form__check input:invalid ~ label {
color: #dc3545;
}
/**
* Replaces platform-native checkboxes and radio buttons controls with custom controls (a radio button, a checkbox, or a toggle).
* Why? It is hard to style states of platform-native checkboxes and radio buttons - for example :invalid state is shown differently in different web browsers.
* Based on: https://css-tricks.com/custom-styling-form-inputs-with-modern-css-features/ The following changes were made:
* - to be like in Bootstrap: the height of the controls was decreased from 21px to 16px, label font size has been increased from 14px to the default (16px),
* colors has been changed, width of focused controls box-shadow has been increased from 2px to 3px, no change on :hover,
* a radio button and a checkbox inner parts aren't animated, a toggle knob doesn't bounce, transitions has been speed up
* - code has been simplified: among others the order of CSS rules has been changed (it was possible because CSS selectors are nested more rarely)
* When Windows scaling is enabled, then artifacts can be visible in small elements which have width/height or position not divisible by 4px. So if it is crucial
* that there are no artifacts visible (like in a radio button or a toggle), then it is best if:
* - all widths and heights are a multiple of 4px,
* - "transform: ..." functions are used because their result can be non-integer pixels that are displayed correctly.
*/
.iw-form--custom-toggles .iw-form__check input {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
box-sizing: border-box;
display: inline-block;
transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
border: 1px solid #adb5bd;
height: 16px;
vertical-align: middle;
}
.iw-form--custom-toggles .iw-form__check input:disabled {
background: #f8f9fa;
opacity: 0.9;
}
.iw-form--custom-toggles .iw-form__check input:not(:disabled) {
background: white;
}
.iw-form--custom-toggles .iw-form__check input:disabled:checked {
background: #dee2e6;
}
.iw-form--custom-toggles .iw-form__check input:not(:disabled):checked {
background: #007bff;
border-color: #007bff;
}
.iw-form--custom-toggles .iw-form__check input:checked {
--opacity: 1;
--x: 50%;
--color: white;
}
.iw-form--custom-toggles .iw-form__check input[type=radio] {
border-radius: 50%;
width: 16px;
}
.iw-form--custom-toggles .iw-form__check input[type=checkbox]:not(.iw-form__switch) {
border-radius: 5px;
width: 16px;
}
.iw-form--custom-toggles .iw-form__check input[type=checkbox].iw-form__switch {
border-radius: 8px;
width: 32px;
}
.iw-form--custom-toggles .iw-form__check input[type=radio]::after, .iw-form--custom-toggles .iw-form__check input[type=checkbox]::after {
box-sizing: border-box;
position: relative;
left: 50%;
top: 50%;
display: block;
transition: transform 0.15s, opacity 0.15s;
height: 16px;
content: "";
}
.iw-form--custom-toggles .iw-form__check input[type=radio]::after {
border-radius: 50%;
background: white;
width: 16px;
}
.iw-form--custom-toggles .iw-form__check input[type=checkbox]:not(.iw-form__switch)::after {
border: 4px solid white;
border-left: 0;
border-top: 0;
width: 10px;
}
.iw-form--custom-toggles .iw-form__check input[type=checkbox].iw-form__switch::after {
border-radius: 50%;
background: var(--color, #adb5bd);
width: 16px;
}
.iw-form--custom-toggles .iw-form__check input[type=radio]::after {
transform: translate(-50%, -50%) scale(0.5);
opacity: var(--opacity, 0);
}
.iw-form--custom-toggles .iw-form__check input[type=checkbox]:not(.iw-form__switch)::after {
transform: translate(-50%, -50%) translateY(-10%) rotate(43deg) scale(0.5);
opacity: var(--opacity, 0);
}
.iw-form--custom-toggles .iw-form__check input[type=checkbox].iw-form__switch::after {
transform: translate(-50%, -50%) translateX(var(--x, -50%)) scale(0.75);
opacity: 1;
}
.iw-form--custom-toggles .iw-form__check input[type=checkbox].iw-form__switch:disabled:not(:checked)::after {
opacity: 0.6;
}
.iw-form--custom-toggles .iw-form__check input:focus {
outline: none;
}
.iw-form--custom-toggles .iw-form__check input:invalid {
outline: none;
box-shadow: none;
}
.iw-form--custom-toggles .iw-form__check input:focus {
border-color: #409cff;
box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}
.was-validated.iw-form--custom-toggles .iw-form__check input:valid {
border-color: #28a745;
}
.was-validated.iw-form--custom-toggles .iw-form__check input:invalid {
border-color: #dc3545;
}
.was-validated.iw-form--custom-toggles .iw-form__check input:valid:focus {
box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}
.was-validated.iw-form--custom-toggles .iw-form__check input:invalid:focus {
box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}
.was-validated.iw-form--custom-toggles .iw-form__check input:valid:checked {
background: rgba(40, 167, 69, 0.5);
}
.was-validated.iw-form--custom-toggles .iw-form__check input:invalid:checked {
background: rgba(220, 53, 69, 0.5);
}
.iw-form--custom-toggles .iw-form__check input + label {
display: inline-block;
margin-left: 0.25em;
line-height: 1.5;
vertical-align: middle;
}
.iw-nav {
display: flex;
flex-flow: column nowrap;
margin: 0.7em 0;
line-height: 1.5;
}
.iw-nav__item {
color: inherit;
text-decoration: none;
}
.iw-nav__item--disabled {
color: #6c757d;
cursor: default;
}
#iw-page__second-nav .iw-nav__item--disabled {
color: #646c73;
}
.iw-nav__item--active {
font-weight: bold;
}
.iw-nav--tabs {
flex-flow: row wrap;
border-bottom: 1px solid #dee2e6;
}
.iw-nav--tabs a:hover {
text-decoration: none !important;
}
.iw-nav--tabs .iw-nav__item {
margin-bottom: -1px;
border: 1px solid transparent;
border-top-left-radius: 0.25rem;
border-top-right-radius: 0.25rem;
padding: 0.3em 0.6em;
}
.iw-nav--tabs .iw-nav__item:not(.iw-nav__item--disabled):hover,
.iw-nav--tabs .iw-nav__item--active {
border-left: 1px solid #dee2e6;
border-right: 1px solid #dee2e6;
border-top: 1px solid #dee2e6;
}
.iw-nav--tabs .iw-nav__item--active {
border-bottom: 1px solid white;
background: #f8f9fa;
font-weight: normal;
}
.iw-panels {
margin: 0.7em 0;
}
.iw-panels__panel {
display: none;
}
.iw-panels__panel--active {
display: block;
}
.iw-navbar {
display: flex;
flex-wrap: wrap;
align-items: center;
}
.iw-navbar a {
padding: 0.8em;
text-decoration: none;
}
.iw-navbar a:hover {
text-decoration: none;
}
.iw-navbar--dark {
background: #343a40;
}
.iw-navbar--dark * {
color: rgba(255, 255, 255, 0.8);
}
.iw-navbar--dark *:hover {
color: white;
}
.iw-navbar--light {
background: #f8f9fa;
}
.iw-navbar--light * {
color: rgba(0, 0, 0, 0.5);
}
.iw-navbar--light *:hover {
color: rgba(0, 0, 0, 0.7);
}
.iw-navbar__brand {
font-size: 125%;
}
.iw-navbar__nav {
list-style: none;
}
@media (min-width: 576px) { /* landscape phones and larger screens */
.iw-navbar__toggler {
display: none;
}
.iw-navbar__nav {
display: flex;
margin-left: auto;
margin-right: 0.5em;
}
}
@media (max-width: 575px) { /* phones */
.iw-navbar__toggler {
margin-left: auto;
margin-right: 0.75em;
outline: none;
cursor: pointer;
}
/* -------- Bootstrap style hamburger icon; source: copied from Bootstrap 4.4.1 from bootstrap.css file -------- */
/* names of classes are changed */
.iw-navbar__toggler {
border: 1px solid transparent;
border-radius: 0.25rem;
background-color: transparent;
padding: 0.25rem 0.75rem;
font-size: 1.25rem;
line-height: 1;
}
.iw-navbar--light .iw-navbar__toggler {
border-color: rgba(0, 0, 0, 0.1);
color: rgba(0, 0, 0, 0.5);
}
.iw-navbar--dark .iw-navbar__toggler {
border-color: rgba(255, 255, 255, 0.1);
color: rgba(255, 255, 255, 0.5);
}
.iw-navbar__toggler-icon {
display: inline-block;
background: no-repeat center center;
background-size: 100% 100%;
width: 1.5em;
height: 1.5em;
content: "";
vertical-align: middle;
}
.iw-navbar--light .iw-navbar__toggler-icon {
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba( 0, 0, 0, 0.5)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
.iw-navbar--dark .iw-navbar__toggler-icon {
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 0.5)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
/* second alternative: Font Awesome icon --------------------- */
/* ----------------------------------------------------------------------------------------------------------------- */
.iw-navbar__nav {
display: none;