This repository has been archived by the owner on May 10, 2023. It is now read-only.
/
media.less
196 lines (165 loc) · 3.22 KB
/
media.less
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
//
// Media
// --------------------------------------------------
/* Removes border when inside `a` element in IE 8/9 */
img {
border: 0;
-ms-interpolation-mode: bicubic;
}
/* Corrects overflow displayed oddly in IE9 */
svg:not(:root) {
overflow: hidden;
}
/* Addresses margin not present in IE 8/9 and Safari 5 */
figure {
margin: 0;
}
/**
* Responsive images (ensure images don't scale beyond their parents)
*/
/* Fluid images for posts, comments, and widgets */
.entry-content img,
.comment-content img,
.widget img {
max-width: 100%;
width: auto\9; // IE7-8 need help adjusting responsive images
height: auto; // Scale the height according to the width, otherwise you get stretching
}
.size-full,
.size-large,
.wp-post-image {
max-width: 100%;
height: auto; // Make sure images with WordPress-added height and width attributes are scaled correctly
}
/* Add fancy borders to all WordPress-added images */
.entry-content img,
.comment-content img,
.wp-post-image,
.widget img,
.thumbnail,
.avatar {
border-radius: 3px;
box-shadow: 0 1px 4px fade(@black, 20%);
}
/* Post thumbnails */
.thumbnail {
float: right;
margin: 0 0 @smallGutterWidth @smallGutterWidth;
}
/* Aligned images */
img.aligncenter {
margin: @smallGutterWidth auto;
}
img.alignleft {
margin: 0 @smallGutterWidth 12px 0;
}
img.alignright {
margin: 0 0 12px @smallGutterWidth;
}
/* Avatars */
.avatar {
float: left;
margin-right: @smallGutterWidth - 7px;
}
/* Remove borders from some images */
.wp-smiley,
.no-image-border,
.rsswidget img {
border-radius: 0 !important;
box-shadow: none !important;
}
/* Make sure videos and embeds fit their containers */
embed,
iframe,
object,
video {
max-width: 100%;
}
iframe {
border: none;
}
/* Style seamless iframes */
iframe[seamless] {
background-color: transparent;
border: 0px none transparent;
padding: 0px;
overflow: hidden;
}
/* Override the Twitter embed fixed width */
.entry-content .twitter-tweet-rendered {
max-width: 100% !important;
}
/**
* Captions [caption]
*/
.wp-caption {
background: @grayDarker;
border-radius: 0 0 3px 3px;
clear: both;
max-width: 100%;
margin: @smallGutterWidth 0;
padding-top: 5px;
text-align: center;
img {
border-radius: 0;
box-shadow: none;
}
// Aligned captions
&.aligncenter {
margin: @smallGutterWidth auto;
}
&.alignleft {
margin: 0 @smallGutterWidth 0 0;
}
&.alignright {
margin: 0 0 0 @smallGutterWidth;
}
}
/* Caption text */
.wp-caption-text {
color: darken(#eee, 6.5%);
#font > .alternative(14px);
padding: 10px 20px 20px;
margin: 0;
}
/**
* Galleries
*/
.gallery {
display: block;
clear: both;
overflow: hidden;
margin: @smallGutterWidth auto;
text-align: center;
}
.gallery-row {
display: block;
clear: both;
overflow: hidden;
margin: 0;
}
.gallery-item {
overflow: hidden;
float: left;
text-align: center;
list-style: none;
margin: 0;
padding: 0;
}
.gallery-caption {
#font > .alternative(14px);
margin: 0 0 15px 0;
}
/* Gallery columns */
.gallery-cols(@index) when (@index > 0) {
// Create the column class
(~".col-@{index}") {
width: percentage((100 / @index) / 100);
}
// Next column
.gallery-cols(@index - 1);
}
// End the loop when index is 0
.gallery-cols(0) {}
// Generate 30 columns
.gallery-cols(30);