added code to darken images in dark mode. Easier on the eyes.
[theme-danix.xyz.git] / assets / sass / components / _image.scss
1 ///
2 /// Forty by HTML5 UP
3 /// html5up.net | @ajlkn
4 /// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
5 ///
6
7 /* Image */
8
9 .image {
10 border: 0;
11 display: inline-block;
12 position: relative;
13
14 img {
15 display: block;
16 }
17
18 &.left,
19 &.right {
20 max-width: 30%;
21
22 img {
23 width: 100%;
24 }
25 }
26
27 &.left {
28 float: left;
29 margin: 0 1.5em 1.25em 0;
30 top: 0.25em;
31 }
32
33 &.right {
34 float: right;
35 margin: 0 0 1.25em 1.5em;
36 top: 0.25em;
37 }
38
39 &.fit {
40 display: block;
41 margin: 0 0 _size(element-margin) 0;
42 width: 100%;
43
44 img {
45 width: 100%;
46 }
47 }
48
49 &.main {
50 display: block;
51 margin: (_size(element-margin) * 1.25) 0;
52 width: 100%;
53
54 img {
55 width: 100%;
56 }
57
58 @include breakpoint('<=small') {
59 margin: (_size(element-margin) * 0.75) 0;
60 }
61 }
62 }
63
64 .circle > img {
65 @include circle(200px, "block");
66 @include box-shadow(-5px, 5px, 5px, _palette_light(fg-bold));
67 @media screen and (prefers-color-scheme: dark) {
68 @include box-shadow(-5px, 5px, 5px, _palette_light(fg-bold));
69 }
70 }
71
72 video {
73 display: block !important;
74 &.left {
75 float: left;
76 margin: 0 1.5em 1.25em 0;
77 top: 0.25em;
78 }
79
80 &.right {
81 float: right;
82 margin: 0 0 1.25em 1.5em;
83 top: 0.25em;
84 }
85
86 &.fit {
87 display: block;
88 margin: 0 0 _size(element-margin) 0;
89 width: 100%;
90 }
91 }
92
93 figure {
94 figcaption {
95 p {
96 text-align: center;
97 }
98 }
99 }