fixed images display inside a figure element, aka when not inside a gallery.
[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 &.shadow {
19 img {
20 @include box-shadow(-5px, 5px, 5px, _palette_light(fg-bold));
21 @media screen and (prefers-color-scheme: dark) {
22 @include box-shadow(-5px, 5px, 5px, _palette_light(fg-bold));
23 }
24 }
25 }
26 &.left,
27 &.right {
28 max-width: 30%;
29
30 img {
31 width: 100%;
32 }
33 }
34
35 &.left {
36 float: left;
37 margin: 0 1.5em 0.5em 1em;
38 top: 0.25em;
39 }
40
41 &.right {
42 float: right;
43 margin: 0 1em 0.5em 1.5em;
44 top: 0.25em;
45 }
46
47 &.fit {
48 display: block;
49 margin: 0 auto _size(element-margin);
50 width: 90%;
51
52 img {
53 width: 100%;
54 }
55 div.picture {
56 max-width: 100%;
57 height: auto;
58 }
59 }
60
61 &.main {
62 display: block;
63 margin: (_size(element-margin) * 1.25) 0;
64 width: 100%;
65
66 img {
67 width: 100%;
68 max-width: 100%;
69 }
70 div.picture {
71 max-width: 100%;
72 height: auto;
73 }
74
75 @include breakpoint('<=small') {
76 margin: (_size(element-margin) * 0.75) 0;
77 }
78 }
79 &.w-full {
80 width: 100%;
81 }
82 &.h-auto {
83 height: auto;
84 }
85 }
86 .image.signature {
87 &.left,
88 &.right {
89 max-width: 60%;
90 }
91 @media screen and (prefers-color-scheme: dark) {
92 filter: invert(84%) sepia(12%) saturate(486%) hue-rotate(197deg) brightness(84%) contrast(87%);
93 }
94 }
95
96 .circle > img {
97 @include circle(200px, "block");
98 @include box-shadow(-5px, 5px, 5px, _palette_light(fg-bold));
99 @media screen and (prefers-color-scheme: dark) {
100 @include box-shadow(-5px, 5px, 5px, _palette_light(fg-bold));
101 }
102 }
103
104 video {
105 display: block !important;
106 &.left {
107 float: left;
108 margin: 0 1.5em 1.25em 0;
109 top: 0.25em;
110 }
111
112 &.right {
113 float: right;
114 margin: 0 0 1.25em 1.5em;
115 top: 0.25em;
116 }
117
118 &.fit {
119 display: block;
120 margin: 0 0 _size(element-margin) 0;
121 width: 100%;
122 }
123 }
124
125 .animate-fade {
126 animation: fadeIn 750ms ease-in-out;
127 }
128
129 figure {
130 figcaption {
131 p {
132 text-align: center;
133 }
134 }
135 }
136 // signature inside single articles
137 div#post-signature {
138 clear: both;
139 overflow: hidden;
140 width: 100%;
141 margin: 0;
142 div#signature {
143 margin: 0;
144 padding: 0;
145 img.signature {
146 margin: 0;
147 margin-right: 4em;
148 width: 350px;
149 }
150 }
151 }
152 .section-blog {
153 .spotlights {
154 .image {
155 max-height: 20em;
156 overflow: hidden;
157 }
158 }
159 }
160
161 div.picture {
162 display: inline-block;
163 }