Skip to content

Commit da70fbd

Browse files
committed
Styled imageCarousel.
1 parent 31f4220 commit da70fbd

1 file changed

Lines changed: 19 additions & 23 deletions

File tree

less/imageCarousel.less

Lines changed: 19 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
2-
//@imageCarouselCaptionWidth: 400px;
3-
@imageCarouselSidePadding: 20px;
4-
5-
.imageCarouselSizes (@imageCarouselCaptionWidth, @imageWidth) {
1+
.imageCarouselSizes (@imageCarouselCaptionWidth, @imageCarouselCaptionPadding, @imageWidth) {
62
.item {
73
img {
84
margin-left: @imageCarouselCaptionWidth + 20px;
@@ -11,6 +7,7 @@
117
.box-sizing(border-box);
128
.carousel-caption {
139
width: @imageCarouselCaptionWidth;
10+
padding: 0 @imageCarouselCaptionPadding 0 @imageCarouselCaptionPadding;
1411
}
1512
}
1613

@@ -20,7 +17,7 @@
2017
}
2118

2219
#imageCarousel {
23-
margin: 0;
20+
margin: 20px 0 0 0;
2421
//height: 450px;
2522
position: relative;
2623

@@ -35,15 +32,14 @@
3532
.box-sizing(border-box);
3633
.carousel-caption {
3734
position: absolute;
38-
top: 0;
35+
top: 45%;
3936
left: 0;
4037
bottom: auto;
4138
//width: @imageCarouselCaptionWidth;
42-
height: 100%;
4339
//background-color: rgba(255, 255, 255, 0.4);
4440
background: none;
4541
.box-sizing(border-box);
46-
padding: 0 @imageCarouselSidePadding 0 @imageCarouselSidePadding;
42+
text-align: center;
4743
p {
4844
font-size: 18px;
4945
line-height: 23px;
@@ -55,18 +51,17 @@
5551

5652
.carousel-controls {
5753
position: absolute;
58-
bottom: 0;
59-
top: auto;
54+
bottom: auto;
55+
top: 30px;
6056
left: 0;
57+
height: 42px;
6158
.box-sizing(border-box);
6259
//background-color: red;
63-
//width: @imageCarouselCaptionWidth;
64-
height: 42px;
6560
ol.carousel-indicators {
6661
position: static;
6762
.box-sizing(border-box);
6863
margin: 0;
69-
padding: 16px 0 0 0;
64+
padding: 12px 0 0 0;
7065
width: 100%;
7166
text-align: center;
7267
display: block;
@@ -78,28 +73,29 @@
7873
}
7974
}
8075
.carousel-control {
81-
position: absolute
82-
top: 0;
83-
left: @imageCarouselSidePadding;
76+
position: absolute;
77+
bottom: auto;
78+
top: 12px;
79+
left: 20px;
8480
font-size: 120px;
8581
text-shadow: 0 1px 1px rgba(0,0,0,.4);
8682
background-color: transparent;
8783
border: 0;
8884
z-index: 10;
8985
&.right {
90-
right: @imageCarouselSidePadding;
86+
right: 20px;
9187
left: auto;
9288
}
9389
}
9490
}
9591

96-
.imageCarouselSizes(@imageCarouselCaptionWidth: 310px, @imageWidth: 605px);
92+
.imageCarouselSizes(@imageCarouselCaptionWidth: 310px, @imageCarouselCaptionPadding: 50px, @imageWidth: 605px);
9793

9894
@media (min-width: 1200px) { /* Large desktop */
99-
.imageCarouselSizes(@imageCarouselCaptionWidth: 400px, @imageWidth: 745px);
95+
.imageCarouselSizes(@imageCarouselCaptionWidth: 400px, @imageCarouselCaptionPadding: 70px, @imageWidth: 745px);
10096
}
10197
@media (min-width: 768px) and (max-width: 979px) { /* Portrait tablet to landscape and desktop */
102-
.imageCarouselSizes(@imageCarouselCaptionWidth: 245px, @imageWidth: 455px);
98+
.imageCarouselSizes(@imageCarouselCaptionWidth: 245px, @imageCarouselCaptionPadding: 10px, @imageWidth: 455px);
10399
}
104100
@media (max-width: 767px) { /* Tablets */
105101
.item {
@@ -128,7 +124,7 @@
128124
}
129125
.carousel-controls {
130126
width: 100%;
131-
//top: 0;
127+
top: auto;
132128
bottom: 10px;
133129
.carousel-control {
134130
&.left {
@@ -144,7 +140,7 @@
144140
.item {
145141
.carousel-caption {
146142
padding: 12px 50px 12px 50px;
147-
min-height: 60px;
143+
min-height: 65px;
148144
p {
149145
font-size: 13px;
150146
line-height: 16px;

0 commit comments

Comments
 (0)