titon-toolkit 0.14.0 → 1.0.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/readme.md +18 -13
  3. data/scss/ie8.scss +23 -16
  4. data/scss/toolkit/_common.scss +126 -7
  5. data/scss/toolkit/{modules → components}/accordion.scss +3 -25
  6. data/scss/toolkit/{modules → components}/blackout.scss +0 -7
  7. data/scss/toolkit/{ui → components}/breadcrumbs.scss +26 -16
  8. data/scss/toolkit/{ui → components}/button-group.scss +1 -8
  9. data/scss/toolkit/{ui → components}/button.scss +0 -5
  10. data/scss/toolkit/components/carousel.scss +147 -0
  11. data/scss/toolkit/{ui → components}/dropdown.scss +30 -27
  12. data/scss/toolkit/{modules → components}/flyout.scss +0 -6
  13. data/scss/toolkit/{layout → components}/grid.scss +1 -1
  14. data/scss/toolkit/components/icon.scss +60 -0
  15. data/scss/toolkit/{layout → components}/input-group.scss +3 -1
  16. data/scss/toolkit/components/input.scss +112 -0
  17. data/scss/toolkit/components/label.scss +106 -0
  18. data/scss/toolkit/components/lazy-load.scss +12 -0
  19. data/scss/toolkit/{ui → components}/matrix.scss +0 -7
  20. data/scss/toolkit/{modules → components}/modal.scss +44 -44
  21. data/scss/toolkit/{ui/alert.scss → components/notice.scss} +13 -20
  22. data/scss/toolkit/{ui → components}/pagination.scss +0 -14
  23. data/scss/toolkit/{ui → components}/pin.scss +0 -5
  24. data/scss/toolkit/{modules → components}/popover.scss +4 -16
  25. data/scss/toolkit/{ui → components}/progress.scss +15 -12
  26. data/scss/toolkit/{modules → components}/showcase.scss +30 -60
  27. data/scss/toolkit/{layout → components}/table.scss +0 -0
  28. data/scss/toolkit/{modules → components}/tabs.scss +0 -16
  29. data/scss/toolkit/{modules → components}/tooltip.scss +1 -15
  30. data/scss/toolkit/{modules → components}/type-ahead.scss +1 -4
  31. data/scss/toolkit/effects/pill.scss +4 -2
  32. data/scss/toolkit/layout/base.scss +68 -30
  33. data/scss/toolkit/layout/code.scss +2 -3
  34. data/scss/toolkit/layout/form.scss +71 -25
  35. data/scss/toolkit/layout/typography.scss +8 -8
  36. data/scss/toolkit/mixins/_grid.scss +0 -8
  37. data/scss/toolkit/mixins/_layout.scss +3 -14
  38. data/scss/toolkit/mixins/_responsive.scss +0 -14
  39. data/scss/toolkit/themes/titon.scss +116 -98
  40. data/scss/toolkit.scss +26 -25
  41. data/version.md +1 -1
  42. metadata +30 -32
  43. data/scss/toolkit/_variables.scss +0 -63
  44. data/scss/toolkit/mixins/_themes.scss +0 -98
  45. data/scss/toolkit/modules/carousel.scss +0 -183
  46. data/scss/toolkit/themes/tomorrow-night.scss +0 -582
  47. data/scss/toolkit/ui/icon.scss +0 -22
  48. data/scss/toolkit/ui/label-badge.scss +0 -76
  49. data/scss/toolkit/ui/lazy-load.scss +0 -19
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d1877da81065120b8d59692a4d5976779e3c18b2
4
- data.tar.gz: e80f6b1502deb01b3dff2a9a5f1fd6dcc4929c89
3
+ metadata.gz: 642d038256be3a9201f7a28cbc2aaa5f3458f42a
4
+ data.tar.gz: 609d7970a0d8e4bc24af97dfc7349811ae9f20ea
5
5
  SHA512:
6
- metadata.gz: 56d5a8e9e9c58cea975f5ee53be72a08de641742633cc291d26916f2b2b2239e4f4adb9d23a8c910bd003915c10ed36b4086ec7f02c0496836f244d488b2c00e
7
- data.tar.gz: 2f71d4940f0de9a354ec8ec37ef8588ebc51ce29936862c87edd37c0c9f1af489779e4b3a02b16cd6e359ac8fc59a77198a6945f0a05c6f33cec602cd7e5b42a
6
+ metadata.gz: e5a8d74277b44630e6ad4b1ea20a0c17a961a2813dff0e7a46870ed6c3dbc6793849135a41f52ee672c1045ca401d12e534d23db5ef4d9e18a8ee25a62cedf04
7
+ data.tar.gz: 333f1c3974501a0a7469b6b54ebd7b6230241fe7619fff9bae50cac1cea2679aa83f363c45771110b6ac414f1b29951d57bb58566f8483f816450eeebb6ece5b
data/readme.md CHANGED
@@ -1,10 +1,10 @@
1
- # Toolkit v0.14.0 #
1
+ # Toolkit v1.0.0 RC1 #
2
2
 
3
- Toolkit is a collection of very powerful user-interface components and utility classes.
3
+ Titon Toolkit is a collection of very powerful user-interface components and utility classes.
4
4
  Each component represents encapsulated HTML, CSS and JS functionality for role specific page elements.
5
5
 
6
6
  Titon makes use of the latest and greatest technology. This includes CSS3 for animation (fade, slide, etc),
7
- Sass for CSS pre-processing, Grunt for task and package management, and Intern for unit testing.
7
+ Sass for CSS pre-processing, and Grunt for task and package management.
8
8
 
9
9
  #### Demo ####
10
10
  A temporary demo can be found here: http://titon.io/toolkit
@@ -47,12 +47,16 @@ IE9 does not support CSS3 transitions and any type of animation will fallback to
47
47
  IE8 does not support CSS3 transitions, rem scaling, media queries and specific HTML 5 elements. To support IE8, the Toolkit `ie8.css` file must be included.
48
48
  To support media queries and responsiveness, use [respond.js](https://github.com/scottjehl/Respond). To support HTML 5 features, use [modernizr](http://modernizr.com).
49
49
 
50
+ Furthermore, the following Toolkit components do not work in IE8: Input, Matrix.
51
+
50
52
  ## Javascript Components ##
51
53
  #### Modules ####
52
54
  * `Accordion` - Provides collapsible support to a list of sections
53
55
  * `Blackout` - Displays a transparent black element over the document
54
56
  * `Carousel` - Provides a 16:9 responsive carousel with panels that slide or fade in
57
+ * `Dropdown` - Allows for toggleable dropdown menus with support for nested menus
55
58
  * `Flyout` - Displays nested flyout menus that appear below an element that activates it
59
+ * `Input` - Replaces select boxes, checkboxes and radios with custom basic functionality
56
60
  * `LazyLoad` - Provides an easy way to lazy-load images (inline and background) while scrolling
57
61
  * `Matrix` - Reorganizes elements into a modular cascading grid (masonry style)
58
62
  * `Modal` - Displays dynamic modals that will display above the content
@@ -60,7 +64,6 @@ To support media queries and responsiveness, use [respond.js](https://github.com
60
64
  * `Popover` - Displays dynamic notification elements over an element
61
65
  * `Showcase` - Provides a lightbox style image gallery
62
66
  * `Tabs` - Provides tabbed support to an element containing navigation tabs and sections
63
- * `Toggle` - Toggles the display of a target element; useful for triggering transitions
64
67
  * `Tooltip` - Displays dynamic tooltips over an element or the mouse cursor
65
68
  * `TypeAhead` - Displays a list of possible options below an input while typing
66
69
 
@@ -75,28 +78,25 @@ Titon also provides classes that build upon MooTools itself. These classes do no
75
78
  * `Base` - Provides utility and helper classes
76
79
  * `Code` - Styles for code blocks
77
80
  * `Form` - Allows for vertical, horizontal and inline forms; also provides default styles
78
- * `Grid` - Implements a fluid 12 column grid system with responsive support for all devices
79
- * `InputGroup` - Allows for the grouping of inputs with buttons and static blocks
80
81
  * `Responsive` - Responsive classes for mobile, tablet and desktop resolutions
81
- * `Table` - Styles for tables
82
82
  * `Typography` - Resets and default styles for typography
83
83
 
84
84
  #### UI ####
85
- * `Alert` - Styles for block level notification messages
86
85
  * `Breadcrumbs` - Styles for bread crumb navigation trails
87
86
  * `Button` - Styles for generic cross-browser compatible buttons
88
87
  * `ButtonGroup` - Allows for the grouping of multiple buttons into 1 visual styled button
89
- * `Dropdown` - Allows for toggleable dropdown menus with support for nested menus
88
+ * `Grid` - Implements a fluid 12 column grid system with responsive support for all devices
90
89
  * `Icon` - Allows for inline image sprites to be used at 12, 16, 24, 32, and 64 sizes
90
+ * `InputGroup` - Allows for the grouping of inputs with buttons and static blocks
91
91
  * `Label` - Styles for inline tag labels
92
- * `Badge` - Styles for inline notification bubbles
92
+ * `Notice` - Styles for block level notification messages
93
93
  * `Pagination` - Styles for pagination lists
94
94
  * `Pin` - Animations for element pinning
95
95
  * `Progress` - Basic styles for progress bars
96
+ * `Table` - Styles for tables
96
97
 
97
98
  #### Themes ####
98
- * `Titon` - Titon specific theme that mimics Twitter Bootstrap
99
- * `TomorrowNight` - Tomorrow Night theme for all Titon components
99
+ * `Titon` - Titon specific theme used for examples
100
100
 
101
101
  ## Authors ##
102
102
  * [Miles Johnson](https://github.com/milesj)
@@ -108,4 +108,9 @@ Titon also provides classes that build upon MooTools itself. These classes do no
108
108
  ## Known Issues ##
109
109
  * Zepto is currently not supported (too different of an API)
110
110
  * Slide in modal animations do not work correctly in Chrome/IE
111
- * Flip modal animations do not work in Opera
111
+ * Flip modal animations do not work in Opera
112
+
113
+ ## To Do ##
114
+ * Guide component
115
+ * Marquee component
116
+ * Custom inputs component
data/scss/ie8.scss CHANGED
@@ -25,7 +25,11 @@ h4 { font-size: 28px; }
25
25
  h5 { font-size: 24px; }
26
26
  h6 { font-size: 18px; }
27
27
 
28
- .x { font-size: 24px; }
28
+ .x,
29
+ .arrow-up,
30
+ .arrow-down,
31
+ .arrow-left,
32
+ .arrow-right { font-size: 24px; }
29
33
 
30
34
  .input,
31
35
  .input-static,
@@ -54,8 +58,6 @@ legend,
54
58
  }
55
59
 
56
60
  .type-ahead-desc,
57
- .label,
58
- .badge,
59
61
  .progress-bar {
60
62
  font-size: 9px;
61
63
  }
@@ -85,7 +87,7 @@ pre,
85
87
  .showcase-prev,
86
88
  .showcase-next,
87
89
  .showcase-tabs,
88
- .alert,
90
+ .notice,
89
91
  .breadcrumbs a,
90
92
  .button {
91
93
  padding: $padding;
@@ -96,17 +98,17 @@ pre,
96
98
  .table.table--compact.table--sortable thead th a,
97
99
  .table.table--compact.table--sortable thead th span,
98
100
  .flyout ul li > a,
99
- .flyout ul li > .divider,
101
+ .flyout-divider,
100
102
  .popover-head,
101
103
  .popover-body,
102
104
  .tooltip,
103
105
  .type-ahead ul li a
104
- .type-ahead ul li.heading,
106
+ .type-ahead-heading,
105
107
  .breadcrumbs.small a,
106
108
  .button.small,
107
109
  .small .button,
108
110
  .dropdown li > a,
109
- .dropdown li.heading,
111
+ .dropdown-heading,
110
112
  .type-ahead ul a {
111
113
  padding: $padding-small;
112
114
  }
@@ -122,7 +124,7 @@ blockquote { padding: 0 $padding; }
122
124
  legend { padding-right: $padding; }
123
125
 
124
126
  pre, p, ul, ol, hr,
125
- .alert,
127
+ .notice,
126
128
  .breadcrumbs,
127
129
  .pagination {
128
130
  margin: $margin 0;
@@ -130,8 +132,9 @@ pre, p, ul, ol, hr,
130
132
 
131
133
  blockquote { margin: $margin; }
132
134
 
133
- .alert .close,
134
- .button-group + .button-group {
135
+ .notice-close,
136
+ .button-group + .button-group,
137
+ .breadcrumbs a .divider {
135
138
  margin-left: $margin;
136
139
  }
137
140
 
@@ -149,27 +152,31 @@ blockquote { margin: $margin; }
149
152
 
150
153
  .form--inline .field-label { margin: 0 ($margin / 2) 0 0; }
151
154
  .form--horizontal .field-col { padding-left: $margin; }
152
- .alert-title { margin: 0 0 ($margin / 2) 0; }
153
- .dropdown li.divider { margin: ($margin / 2) 0; }
155
+ .notice { margin: 0 0 ($margin / 2) 0; }
156
+ .dropdown-divider { margin: ($margin / 2) 0; }
154
157
  .pagination li { margin-right: $padding / 2; }
155
158
 
156
159
  .showcase-tabs { top: $padding; }
157
160
  .showcase-prev { left: $padding; }
158
161
  .showcase-next { right: $padding; }
159
162
 
163
+ .label { padding: 5px; font-size: 10px; }
164
+ .label.small { padding: 3px; font-size: 9px; }
165
+ .label.large { padding: 8px; font-size: 12px; }
166
+
167
+ .modal-close,
168
+ .showcase-close { top: $padding; right: $padding; }
169
+
160
170
  // IE8 does not support rgba
161
171
  // So use solid colors instead
162
172
 
163
- .close .x { color: #000; }
164
- .close:hover { background: #fff; }
165
-
166
173
  .blackout { background: #000; filter: alpha(opacity=50); }
167
174
 
168
175
  .carousel-caption,
169
176
  .showcase-caption { background: #000; filter: alpha(opacity=70); }
170
177
 
171
178
  .carousel-tabs,
172
- .showcase-tabs { left: auto; right: auto; }
179
+ .showcase-tabs { left: auto; right: auto; top: $padding; }
173
180
 
174
181
  .showcase-next,
175
182
  .showcase-prev,
@@ -1,16 +1,135 @@
1
1
 
2
- //-------------------- Toolkit --------------------//
2
+ //-------------------- Imports --------------------//
3
3
 
4
- @import "variables";
5
4
  @import "mixins/layout";
6
5
  @import "mixins/grid";
7
6
  @import "mixins/responsive";
8
- @import "mixins/themes";
9
-
10
- //-------------------- Compass --------------------//
11
-
12
7
  @import "compass/css3/box-sizing";
13
8
  @import "compass/css3/images";
14
9
  @import "compass/css3/transition";
15
10
  @import "compass/css3/transform";
16
- @import "compass/css3/filter";
11
+ @import "compass/css3/filter";
12
+
13
+ //-------------------- Compass --------------------//
14
+
15
+ $experimental-support-for-mozilla: true !default;
16
+ $experimental-support-for-webkit: true !default;
17
+ $experimental-support-for-opera: false !default;
18
+ $experimental-support-for-microsoft: false !default;
19
+ $experimental-support-for-khtml: false !default;
20
+
21
+ $support-for-original-webkit-gradients: false !default;
22
+
23
+ //-------------------- Colors --------------------//
24
+
25
+ $gray-lightest: #fbfbfb !default;
26
+ $gray-light: #f8f8f8 !default;
27
+ $gray: #f5f5f5 !default;
28
+ $gray-dark: #e5e5e5 !default;
29
+ $gray-darkest: #c2c2c2 !default;
30
+
31
+ $background-color: #fff !default;
32
+ $foreground-color: #2d2d2d !default;
33
+
34
+ //-------------------- Sizes --------------------//
35
+
36
+ $padding: .75rem !default;
37
+ $margin: 1.25rem !default;
38
+
39
+ $small-size: .7rem !default;
40
+ $small-padding: .5rem !default;
41
+
42
+ $medium-size: inherit !default;
43
+ $medium-padding: $padding !default;
44
+
45
+ $large-size: 1.3rem !default;
46
+ $large-padding: 1rem !default;
47
+
48
+ //-------------------- States --------------------//
49
+
50
+ $default: #929497 !default;
51
+ $default-light: #d0d2d3 !default;
52
+ $default-dark: #404041 !default;
53
+
54
+ $info: #45c5eb !default;
55
+ $info-light: #dbf1fa !default;
56
+ $info-dark: #4067ab !default;
57
+
58
+ $warning: #fcd04b !default;
59
+ $warning-light: #ffebb5 !default;
60
+ $warning-dark: #c87e00 !default;
61
+
62
+ $success: #97cb6f !default;
63
+ $success-light: #e7f2dd !default;
64
+ $success-dark: #226b36 !default;
65
+
66
+ $error: #f06060 !default;
67
+ $error-light: #fdc5c1 !default;
68
+ $error-dark: #b10e0e !default;
69
+
70
+ //-------------------- Border Styles --------------------//
71
+
72
+ $round: .2rem !default;
73
+
74
+ $pill: 2rem !default;
75
+
76
+ $oval-x: 7rem !default;
77
+ $oval-y: 2.75rem !default;
78
+
79
+ $skew-x: 1rem !default;
80
+ $skew-y: 3rem !default;
81
+ $skew: $skew-x $skew-y;
82
+ $skew-reverse: $skew-y $skew-x;
83
+
84
+ //-------------------- Opacity --------------------//
85
+
86
+ $default-opacity: .5 !default;
87
+ $disabled-opacity: $default-opacity !default;
88
+ $blackout-opacity: $default-opacity !default;
89
+ $carousel-opacity: $default-opacity !default;
90
+ $showcase-opacity: $default-opacity !default;
91
+
92
+ //-------------------- Transitions --------------------//
93
+
94
+ $default-transition: .3s !default;
95
+ $accordion-transition: $default-transition !default;
96
+ $blackout-transition: $default-transition !default;
97
+ $carousel-transition: 1s !default;
98
+ $dropdown-transition: $default-transition !default;
99
+ $flyout-transition: $default-transition !default;
100
+ $lazyLoad-transition: $default-transition !default;
101
+ $matrix-transition: $default-transition !default;
102
+ $modal-transition: $default-transition !default;
103
+ $progress-transition: $default-transition !default;
104
+ $showcase-transition: $default-transition !default;
105
+ $tooltip-transition: $default-transition !default;
106
+
107
+ //-------------------- Transitions --------------------//
108
+
109
+ $icon-animation: 1.5s !default;
110
+
111
+ //-------------------- Responsive --------------------//
112
+
113
+ $responsive-design: "mobile" !default; // mobile, desktop
114
+ $responsive-size: "both" !default; // device, size, both
115
+
116
+ $breakpoint-desktop: 1440px !default;
117
+ $breakpoint-laptop: 1280px !default;
118
+ $breakpoint-tablet-landscape: 1024px !default;
119
+ $breakpoint-tablet-portrait: 768px !default;
120
+ $breakpoint-mobile-landscape: 480px !default;
121
+ $breakpoint-mobile-portrait: 320px !default;
122
+
123
+ $breakpoint-small: 768px !default;
124
+ $breakpoint-medium: 1280px !default;
125
+ $breakpoint-large: 1440px !default;
126
+
127
+ //-------------------- Grid --------------------//
128
+
129
+ $grid-columns-large: 12 !default;
130
+ $grid-columns-medium: 8 !default;
131
+ $grid-columns-small: 6 !default;
132
+
133
+ $grid-columns-desktop: 12 !default;
134
+ $grid-columns-tablet: 6 !default;
135
+ $grid-columns-mobile: 3 !default;
@@ -6,33 +6,13 @@
6
6
 
7
7
  @import "../common";
8
8
 
9
- $accordion-transition: $default-transition !default;
10
-
11
- /**
12
- * Should be used in conjunction with the JavaScript Titon.Tooltip module.
13
- *
14
- * <ul class="accordion">
15
- * <li>
16
- * <header class="accordion-head">Title Bar</header>
17
- * <section class="accordion-inner">
18
- * <div class="accordion-body">Collapsible content</div>
19
- * </section>
20
- * </li>
21
- * </ul>
22
- */
23
-
24
- .accordion,
25
- .accordion li {
9
+ .accordion {
26
10
  list-style: none;
27
11
  text-align: left;
28
12
  margin: 0;
29
13
  padding: 0;
30
14
  }
31
15
 
32
- .accordion {
33
- border: 1px solid $gray-dark;
34
- }
35
-
36
16
  .accordion-head {
37
17
  padding: $padding;
38
18
  background: $gray;
@@ -46,19 +26,17 @@ $accordion-transition: $default-transition !default;
46
26
  }
47
27
  }
48
28
 
49
- // Style this
50
29
  .accordion-body {
51
30
  padding: $padding;
52
31
 
53
32
  @include content-spacing;
54
33
  }
55
34
 
56
- // Inner is used for animations, do not style it!
57
- .accordion-inner {
35
+ // Handle is used for animations, do not style it!
36
+ .accordion-handle {
58
37
  overflow: hidden;
59
38
  position: relative;
60
39
  @include transition(all $accordion-transition ease-in-out);
61
40
 
62
- &.show { height: auto; }
63
41
  &.hide { max-height: 0; } // don't include on base styles
64
42
  }
@@ -6,13 +6,6 @@
6
6
 
7
7
  @import "../common";
8
8
 
9
- $blackout-opacity: .5 !default;
10
- $blackout-transition: $default-transition !default;
11
-
12
- /**
13
- * Should be used in conjunction with the JavaScript Titon.Blackout module.
14
- */
15
-
16
9
  .blackout {
17
10
  position: fixed;
18
11
  top: 0;
@@ -6,24 +6,11 @@
6
6
 
7
7
  @import "../common";
8
8
 
9
- /**
10
- * <nav class="breadcrumbs">
11
- * <ol>
12
- * <li><a href="">Home</a></li>
13
- * <li><a href="">Sub-page</a></li>
14
- * <li><a href="">Sub-page</a></li>
15
- * <li><a href="">Sub-page</a></li>
16
- * <li><a href="">Current</a></li>
17
- * </ol>
18
- * </nav>
19
- */
20
-
21
9
  .breadcrumbs {
22
10
  text-align: left;
23
11
  margin: $margin 0;
24
12
  background: $gray;
25
13
  border: 1px solid $gray-dark;
26
- border-radius: $round;
27
14
 
28
15
  ul, ol {
29
16
  margin: 0;
@@ -34,16 +21,39 @@
34
21
  position: relative;
35
22
  list-style: none;
36
23
  float: left;
24
+
25
+ &:last-child {
26
+ .divider { display: none; }
27
+ }
37
28
  }
38
29
 
39
30
  a {
31
+ @include size-medium;
40
32
  display: block;
41
33
  line-height: 100%;
42
- @include size-medium;
34
+ padding-right: 0;
35
+
36
+ .divider {
37
+ margin-left: $medium-padding;
38
+ color: $gray-darkest;
39
+ position: relative;
40
+ left: -1px;
41
+ }
43
42
  }
44
43
 
45
- &.small a { @include size-small; }
46
- &.large a { @include size-large; }
44
+ &.small a {
45
+ @include size-small;
46
+ padding-right: 0;
47
+
48
+ .divider { margin-left: $small-padding; }
49
+ }
50
+
51
+ &.large a {
52
+ @include size-large;
53
+ padding-right: 0;
54
+
55
+ .divider { margin-left: $large-padding; }
56
+ }
47
57
 
48
58
  @include clear-fix;
49
59
  }
@@ -6,14 +6,6 @@
6
6
 
7
7
  @import "../common";
8
8
 
9
- /**
10
- * <div class="button-group pill">
11
- * <a href="" class="button">Left Button</a>
12
- * <a href="" class="button">Center Button</a>
13
- * <a href="" class="button">Right Button</a>
14
- * </div>
15
- */
16
-
17
9
  .button-group {
18
10
  @include reset-inline-block;
19
11
  white-space: nowrap;
@@ -103,6 +95,7 @@
103
95
  display: table;
104
96
  width: 100%;
105
97
 
98
+ > li,
106
99
  > .button {
107
100
  float: none;
108
101
  display: table-cell;
@@ -6,11 +6,6 @@
6
6
 
7
7
  @import "../common";
8
8
 
9
- /**
10
- * <button type="button" class="button large round">Large Rounded Button</button>
11
- * <a href="" class="button small pill">Small Pill Button</a>
12
- */
13
-
14
9
  .button {
15
10
  @include reset-inline-block;
16
11
  @include size-medium;
@@ -0,0 +1,147 @@
1
+ /**
2
+ * @copyright 2010-2013, The Titon Project
3
+ * @license http://opensource.org/licenses/bsd-license.php
4
+ * @link http://titon.io
5
+ */
6
+
7
+ @import "../common";
8
+
9
+ .carousel {
10
+ margin: 0 auto;
11
+ text-align: left;
12
+ background-color: #000;
13
+ position: relative;
14
+ }
15
+
16
+ .carousel-items {
17
+ /* 4:3 ratio */
18
+ padding-bottom: 75%;
19
+ width: 100%;
20
+ max-width: 100%;
21
+ overflow: hidden;
22
+ position: relative;
23
+
24
+ ul {
25
+ position: absolute;
26
+ list-style: none;
27
+ margin: 0;
28
+ padding: 0;
29
+ top: 0;
30
+ left: 0;
31
+ @include transition(left $carousel-transition, top $carousel-transition);
32
+
33
+ > li {
34
+ width: 100%;
35
+ height: auto;
36
+ position: relative;
37
+
38
+ > img {
39
+ display: block;
40
+ width: 100%;
41
+ max-width: 100%;
42
+ height: auto;
43
+ }
44
+ }
45
+ }
46
+ }
47
+
48
+ .carousel-caption {
49
+ position: absolute;
50
+ bottom: 0;
51
+ left: 0;
52
+ width: 100%;
53
+ padding: $padding;
54
+ color: #fff;
55
+ background: black(.7);
56
+
57
+ @include in-small {
58
+ font-size: $small-size;
59
+ padding: $small-padding;
60
+ }
61
+ }
62
+
63
+ .carousel-prev,
64
+ .carousel-next {
65
+ display: block;
66
+ position: absolute;
67
+ padding: $padding;
68
+ width: auto;
69
+ height: auto;
70
+ z-index: 5;
71
+ opacity: $carousel-opacity;
72
+ top: 50%;
73
+ @include transform(translateY(-50%)); // move up 50% of their height
74
+
75
+ .arrow-left,
76
+ .arrow-right {
77
+ color: #fff;
78
+ font-size: 2rem;
79
+ }
80
+
81
+ &:hover { opacity: 1; }
82
+ &:focus { outline: none; }
83
+
84
+ // Large icons for large resolutions
85
+ @include if-tablet-landscape {
86
+ .arrow-left,
87
+ .arrow-right {
88
+ font-size: 3rem;
89
+ }
90
+ }
91
+ }
92
+
93
+ .carousel-prev { left: 0; }
94
+ .carousel-next { right: 0; }
95
+
96
+ .carousel-tabs {
97
+ position: absolute;
98
+ top: $padding;
99
+ left: 50%;
100
+ z-index: 5;
101
+ @include transform(translateX(-50%)); // move left 50% of their width
102
+ }
103
+
104
+ //-------------------- Animations --------------------//
105
+
106
+ .carousel.slide {
107
+ .carousel-items ul {
108
+ @include clear-fix;
109
+
110
+ > li {
111
+ float: left;
112
+ }
113
+ }
114
+ }
115
+
116
+ .carousel.fade {
117
+ .carousel-items ul {
118
+ position: relative;
119
+
120
+ > li {
121
+ position: absolute;
122
+ top: 0;
123
+ left: 0;
124
+ opacity: 0;
125
+ z-index: 1;
126
+ @include transition(opacity $carousel-transition);
127
+
128
+ &.show { z-index: 2; }
129
+ }
130
+ }
131
+ }
132
+
133
+ //-------------------- Modifiers --------------------//
134
+
135
+ .carousel.carousel--wide {
136
+ .carousel-items {
137
+ /* 16:9 ratio */
138
+ padding-bottom: 56.25%;
139
+ }
140
+ }
141
+
142
+ .carousel.carousel--square {
143
+ .carousel-items {
144
+ /* 1:1 ratio */
145
+ padding-bottom: 100%;
146
+ }
147
+ }