aboutsummaryrefslogtreecommitdiff
path: root/less/carousel.less
diff options
context:
space:
mode:
authorJacob Thornton <[email protected]>2012-01-26 21:48:46 -0800
committerJacob Thornton <[email protected]>2012-01-26 21:48:46 -0800
commitdc2deb9a1b1995bbabee91bfd579d9b466fe78f2 (patch)
tree9606da7326fd0a1e2ba1727e7390a69555bd92c3 /less/carousel.less
parente0e54d9c6cb39eae53e31117c38ceae0a08a6e0b (diff)
downloadbootstrap-dc2deb9a1b1995bbabee91bfd579d9b466fe78f2.tar.xz
bootstrap-dc2deb9a1b1995bbabee91bfd579d9b466fe78f2.zip
moving structure around + more work on builder...
Diffstat (limited to 'less/carousel.less')
-rw-r--r--less/carousel.less114
1 files changed, 114 insertions, 0 deletions
diff --git a/less/carousel.less b/less/carousel.less
new file mode 100644
index 000000000..254a9f60c
--- /dev/null
+++ b/less/carousel.less
@@ -0,0 +1,114 @@
+// CAROUSEL
+// --------
+
+.carousel {
+ position: relative;
+ line-height: 1;
+}
+
+.carousel-inner {
+ overflow: hidden;
+ width: 100%;
+ position: relative;
+}
+
+.carousel {
+
+ .item {
+ display: none;
+ position: relative;
+ .transition(.6s ease-in-out left);
+ }
+
+ // Account for jankitude on images
+ .item > img {
+ display: block;
+ line-height: 1;
+ }
+
+ .active,
+ .next,
+ .prev { display: block; }
+
+ .active {
+ left: 0;
+ }
+
+ .next,
+ .prev {
+ position: absolute;
+ top: 0;
+ width: 100%;
+ }
+
+ .next {
+ left: 100%;
+ }
+ .prev {
+ left: -100%;
+ }
+ .next.left,
+ .prev.right {
+ left: 0;
+ }
+
+ .active.left {
+ left: -100%;
+ }
+ .active.right {
+ left: 100%;
+ }
+
+}
+
+// Left/right controls for nav
+// ---------------------------
+
+.carousel-control {
+ position: absolute;
+ top: 40%;
+ left: 15px;
+ width: 40px;
+ height: 40px;
+ margin-top: -20px;
+ font-size: 60px;
+ font-weight: 100;
+ line-height: 30px;
+ color: @white;
+ text-align: center;
+ background: @grayDarker;
+ border: 3px solid @white;
+ .border-radius(23px);
+ .opacity(50);
+ .transition(all .2s linear);
+
+ // Reposition the right one
+ &.right {
+ left: auto;
+ right: 15px;
+ }
+
+ // Hover state
+ &:hover {
+ color: @white;
+ text-decoration: none;
+ .opacity(90);
+ }
+}
+
+// Caption for text below images
+// -----------------------------
+
+.carousel-caption {
+ position: absolute;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ padding: 10px 15px 5px;
+ background: @grayDark;
+ background: rgba(0,0,0,.75);
+}
+.carousel-caption h4,
+.carousel-caption p {
+ color: @white;
+}