This repository has been archived by the owner on Jul 10, 2020. It is now read-only.
/
featured-content-module.less
88 lines (70 loc) · 1.87 KB
/
featured-content-module.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
.o-featured-content-module {
.u-clearfix();
position: relative;
min-height: 320px;
background-color: @block__bg;
.respond-to-max( @bp-xs-max, {
padding-right: unit( ( @grid_gutter-width / 2 ) / @base-font-size-px, em);
padding-left: unit( ( @grid_gutter-width / 2 ) / @base-font-size-px, em);
} );
.respond-to-range( @bp-sm-min, @fcm-bp-max, {
padding-right: unit( @grid_gutter-width / @base-font-size-px, em);
padding-left: unit( @grid_gutter-width / @base-font-size-px, em);
} );
&_text {
padding-top: unit( @grid_gutter-width / @base-font-size-px, em);
padding-bottom: unit( @grid_gutter-width / @base-font-size-px, em);
.respond-to-min( @fcm-bp-min, {
padding-right: unit( @grid_gutter-width / @base-font-size-px, em);
padding-left: unit( @grid_gutter-width / @base-font-size-px, em);
width: 300px; // Width of 5 of 12 cols at lg size
float: left;
} );
}
&_visual {
.respond-to-min( @fcm-bp-min, {
overflow: hidden;
.lt-ie10 & {
position: absolute;
top: 0;
right: 0;
left: 360px; // Width of 5 of 12 cols at lg size + grid gutters
bottom: 0;
}
} );
}
&_img {
display: block;
.respond-to-max( @bp-sm-max, {
margin-right: auto;
margin-left: auto;
} );
.respond-to-min( @fcm-bp-min, {
height: 320px;
max-width: none;
} );
}
// Modifiers
&__right {
.o-featured-content-module_img {
.respond-to-min( @fcm-bp-min, {
float: right;
} );
}
}
&__center {
.o-featured-content-module_img {
.respond-to-min( @fcm-bp-min, {
position: relative;
left: 50%;
transform: translateX( -50% );
.lt-ie9 & {
position: absolute;
right: -100%;
left: -100%;
margin: auto;
}
} );
}
}
}