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