compass_twitter_bootstrap 2.0.3 → 2.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. data/CHANGELOG.md +6 -0
  2. data/README.md +41 -7
  3. data/build/convert.rb +27 -11
  4. data/lib/compass_twitter_bootstrap/version.rb +1 -1
  5. data/stylesheets/_compass_twitter_bootstrap.scss +2 -1
  6. data/stylesheets/_compass_twitter_bootstrap_awesome.scss +1 -1
  7. data/stylesheets/_compass_twitter_bootstrap_responsive.scss +1 -1
  8. data/stylesheets/compass_twitter_bootstrap/_accordion.scss +4 -3
  9. data/stylesheets/compass_twitter_bootstrap/_alerts.scss +31 -10
  10. data/stylesheets/compass_twitter_bootstrap/_breadcrumbs.scss +14 -14
  11. data/stylesheets/compass_twitter_bootstrap/_button-groups.scss +91 -55
  12. data/stylesheets/compass_twitter_bootstrap/_buttons.scss +126 -84
  13. data/stylesheets/compass_twitter_bootstrap/_carousel.scss +33 -23
  14. data/stylesheets/compass_twitter_bootstrap/_close.scss +7 -5
  15. data/stylesheets/compass_twitter_bootstrap/_code.scss +12 -8
  16. data/stylesheets/compass_twitter_bootstrap/_component-animations.scss +9 -7
  17. data/stylesheets/compass_twitter_bootstrap/_dropdowns.scss +112 -22
  18. data/stylesheets/compass_twitter_bootstrap/_font-awesome.scss +258 -196
  19. data/stylesheets/compass_twitter_bootstrap/_forms.scss +262 -161
  20. data/stylesheets/compass_twitter_bootstrap/_grid.scss +18 -2
  21. data/stylesheets/compass_twitter_bootstrap/_hero-unit.scss +11 -8
  22. data/stylesheets/compass_twitter_bootstrap/_labels-badges.scss +42 -26
  23. data/stylesheets/compass_twitter_bootstrap/_layouts.scss +3 -4
  24. data/stylesheets/compass_twitter_bootstrap/_media.scss +55 -0
  25. data/stylesheets/compass_twitter_bootstrap/_mixins.scss +243 -189
  26. data/stylesheets/compass_twitter_bootstrap/_modals.scss +28 -23
  27. data/stylesheets/compass_twitter_bootstrap/_navbar.scss +269 -143
  28. data/stylesheets/compass_twitter_bootstrap/_navs.scss +59 -46
  29. data/stylesheets/compass_twitter_bootstrap/_pager.scss +17 -12
  30. data/stylesheets/compass_twitter_bootstrap/_pagination.scss +92 -27
  31. data/stylesheets/compass_twitter_bootstrap/_popovers.scss +116 -36
  32. data/stylesheets/compass_twitter_bootstrap/_progress-bars.scss +35 -30
  33. data/stylesheets/compass_twitter_bootstrap/_reset.scss +101 -11
  34. data/stylesheets/compass_twitter_bootstrap/_responsive-1200px-min.scss +9 -7
  35. data/stylesheets/compass_twitter_bootstrap/_responsive-767px-max.scss +115 -71
  36. data/stylesheets/compass_twitter_bootstrap/_responsive-768px-979px.scss +8 -6
  37. data/stylesheets/compass_twitter_bootstrap/_responsive-navbar.scss +53 -14
  38. data/stylesheets/compass_twitter_bootstrap/_responsive-utilities.scss +17 -15
  39. data/stylesheets/compass_twitter_bootstrap/_responsive.scss +48 -0
  40. data/stylesheets/compass_twitter_bootstrap/_scaffolding.scss +27 -4
  41. data/stylesheets/compass_twitter_bootstrap/_sprites.scss +24 -22
  42. data/stylesheets/compass_twitter_bootstrap/_tables.scss +122 -61
  43. data/stylesheets/compass_twitter_bootstrap/_thumbnails.scss +12 -7
  44. data/stylesheets/compass_twitter_bootstrap/_tooltip.scss +50 -15
  45. data/stylesheets/compass_twitter_bootstrap/_type.scss +93 -93
  46. data/stylesheets/compass_twitter_bootstrap/_utilities.scss +9 -2
  47. data/stylesheets/compass_twitter_bootstrap/_variables.scss +134 -38
  48. data/stylesheets/compass_twitter_bootstrap/_wells.scss +11 -10
  49. data/stylesheets_sass/_compass_twitter_bootstrap.sass +2 -1
  50. data/stylesheets_sass/_compass_twitter_bootstrap_awesome.sass +1 -1
  51. data/stylesheets_sass/_compass_twitter_bootstrap_responsive.sass +1 -1
  52. data/stylesheets_sass/compass_twitter_bootstrap/_accordion.sass +4 -3
  53. data/stylesheets_sass/compass_twitter_bootstrap/_alerts.sass +27 -9
  54. data/stylesheets_sass/compass_twitter_bootstrap/_breadcrumbs.sass +12 -13
  55. data/stylesheets_sass/compass_twitter_bootstrap/_button-groups.sass +93 -55
  56. data/stylesheets_sass/compass_twitter_bootstrap/_buttons.sass +113 -88
  57. data/stylesheets_sass/compass_twitter_bootstrap/_carousel.sass +31 -23
  58. data/stylesheets_sass/compass_twitter_bootstrap/_close.sass +5 -4
  59. data/stylesheets_sass/compass_twitter_bootstrap/_code.sass +12 -9
  60. data/stylesheets_sass/compass_twitter_bootstrap/_component-animations.sass +7 -6
  61. data/stylesheets_sass/compass_twitter_bootstrap/_dropdowns.sass +105 -21
  62. data/stylesheets_sass/compass_twitter_bootstrap/_font-awesome.sass +228 -31
  63. data/stylesheets_sass/compass_twitter_bootstrap/_forms.sass +255 -155
  64. data/stylesheets_sass/compass_twitter_bootstrap/_grid.sass +16 -2
  65. data/stylesheets_sass/compass_twitter_bootstrap/_hero-unit.sass +10 -7
  66. data/stylesheets_sass/compass_twitter_bootstrap/_labels-badges.sass +38 -31
  67. data/stylesheets_sass/compass_twitter_bootstrap/_layouts.sass +3 -4
  68. data/stylesheets_sass/compass_twitter_bootstrap/_media.sass +48 -0
  69. data/stylesheets_sass/compass_twitter_bootstrap/_mixins.sass +215 -174
  70. data/stylesheets_sass/compass_twitter_bootstrap/_modals.sass +25 -26
  71. data/stylesheets_sass/compass_twitter_bootstrap/_navbar.sass +229 -134
  72. data/stylesheets_sass/compass_twitter_bootstrap/_navs.sass +53 -46
  73. data/stylesheets_sass/compass_twitter_bootstrap/_pager.sass +16 -12
  74. data/stylesheets_sass/compass_twitter_bootstrap/_pagination.sass +78 -23
  75. data/stylesheets_sass/compass_twitter_bootstrap/_popovers.sass +106 -40
  76. data/stylesheets_sass/compass_twitter_bootstrap/_progress-bars.sass +35 -30
  77. data/stylesheets_sass/compass_twitter_bootstrap/_reset.sass +80 -12
  78. data/stylesheets_sass/compass_twitter_bootstrap/_responsive-1200px-min.sass +8 -7
  79. data/stylesheets_sass/compass_twitter_bootstrap/_responsive-767px-max.sass +89 -54
  80. data/stylesheets_sass/compass_twitter_bootstrap/_responsive-768px-979px.sass +7 -6
  81. data/stylesheets_sass/compass_twitter_bootstrap/_responsive-navbar.sass +38 -13
  82. data/stylesheets_sass/compass_twitter_bootstrap/_responsive-utilities.sass +18 -17
  83. data/stylesheets_sass/compass_twitter_bootstrap/_responsive.sass +44 -0
  84. data/stylesheets_sass/compass_twitter_bootstrap/_scaffolding.sass +24 -4
  85. data/stylesheets_sass/compass_twitter_bootstrap/_sprites.sass +25 -8
  86. data/stylesheets_sass/compass_twitter_bootstrap/_tables.sass +110 -83
  87. data/stylesheets_sass/compass_twitter_bootstrap/_thumbnails.sass +11 -7
  88. data/stylesheets_sass/compass_twitter_bootstrap/_tooltip.sass +43 -19
  89. data/stylesheets_sass/compass_twitter_bootstrap/_type.sass +123 -75
  90. data/stylesheets_sass/compass_twitter_bootstrap/_utilities.sass +7 -2
  91. data/stylesheets_sass/compass_twitter_bootstrap/_variables.sass +141 -37
  92. data/stylesheets_sass/compass_twitter_bootstrap/_wells.sass +10 -9
  93. data/vendor/assets/fonts/fontawesome-webfont.eot +0 -0
  94. data/vendor/assets/fonts/fontawesome-webfont.svg +247 -167
  95. data/vendor/assets/fonts/fontawesome-webfont.ttf +0 -0
  96. data/vendor/assets/fonts/fontawesome-webfont.woff +0 -0
  97. data/vendor/assets/images/glyphicons-halflings-white.png +0 -0
  98. data/vendor/assets/images/glyphicons-halflings.png +0 -0
  99. data/vendor/assets/javascripts/bootstrap-affix.js +117 -0
  100. data/vendor/assets/javascripts/bootstrap-alert.js +13 -4
  101. data/vendor/assets/javascripts/bootstrap-all.js +2 -1
  102. data/vendor/assets/javascripts/bootstrap-button.js +17 -8
  103. data/vendor/assets/javascripts/bootstrap-carousel.js +30 -14
  104. data/vendor/assets/javascripts/bootstrap-collapse.js +24 -14
  105. data/vendor/assets/javascripts/bootstrap-dropdown.js +80 -19
  106. data/vendor/assets/javascripts/bootstrap-modal.js +111 -84
  107. data/vendor/assets/javascripts/bootstrap-popover.js +21 -5
  108. data/vendor/assets/javascripts/bootstrap-scrollspy.js +21 -10
  109. data/vendor/assets/javascripts/bootstrap-tab.js +17 -8
  110. data/vendor/assets/javascripts/bootstrap-tooltip.js +36 -24
  111. data/vendor/assets/javascripts/bootstrap-transition.js +6 -7
  112. data/vendor/assets/javascripts/bootstrap-typeahead.js +87 -49
  113. metadata +17 -7
@@ -1,17 +1,19 @@
1
- // PORTRAIT TABLET TO DEFAULT DESKTOP
2
- // ----------------------------------
1
+ //
2
+ // Responsive: Tablet to desktop
3
+ // --------------------------------------------------
4
+
3
5
 
4
6
  @media (min-width: 768px) and (max-width: 979px) {
5
7
 
6
8
  // Fixed grid
7
- @include bootstrap-grid-core(42px, 20px);
9
+ @include ctb-grid-core($gridColumnWidth768, $gridGutterWidth768);
8
10
 
9
11
  // Fluid grid
10
- @include bootstrap-grid-fluid(5.801104972%, 2.762430939%);
12
+ @include ctb-grid-fluid($fluidGridColumnWidth768, $fluidGridGutterWidth768);
11
13
 
12
14
  // Input grid
13
- @include bootstrap-grid-input(42px, 20px);
15
+ @include ctb-grid-input($gridColumnWidth768, $gridGutterWidth768);
14
16
 
15
- // No need to reset .thumbnails here since it's the same @gridGutterWidth
17
+ // No need to reset .thumbnails here since it's the same $gridGutterWidth
16
18
 
17
19
  }
@@ -1,6 +1,11 @@
1
+ //
2
+ // Responsive: Navbar
3
+ // --------------------------------------------------
4
+
5
+
1
6
  // TABLETS AND BELOW
2
7
  // -----------------
3
- @media (max-width: 979px) {
8
+ @media (max-width: $navbarCollapseWidth) {
4
9
 
5
10
  // UNFIX THE TOPBAR
6
11
  // ----------------
@@ -8,12 +13,19 @@
8
13
  body {
9
14
  padding-top: 0;
10
15
  }
11
- // Unfix the navbar
12
- .navbar-fixed-top {
16
+ // Unfix the navbars
17
+ .navbar-fixed-top,
18
+ .navbar-fixed-bottom {
13
19
  position: static;
20
+ }
21
+ .navbar-fixed-top {
14
22
  margin-bottom: $baseLineHeight;
15
23
  }
16
- .navbar-fixed-top .navbar-inner {
24
+ .navbar-fixed-bottom {
25
+ margin-top: $baseLineHeight;
26
+ }
27
+ .navbar-fixed-top .navbar-inner,
28
+ .navbar-fixed-bottom .navbar-inner {
17
29
  padding: 5px;
18
30
  }
19
31
  .navbar .container {
@@ -54,16 +66,16 @@
54
66
  // Nav and dropdown links in navbar
55
67
  .nav-collapse .nav > li > a,
56
68
  .nav-collapse .dropdown-menu a {
57
- padding: 6px 15px;
69
+ padding: 9px 15px;
58
70
  font-weight: bold;
59
71
  color: $navbarLinkColor;
60
- @include bootstrap-border-radius(3px);
72
+ @include ctb-border-radius(3px);
61
73
  }
62
74
  // Buttons
63
75
  .nav-collapse .btn {
64
76
  padding: 4px 10px 4px;
65
77
  font-weight: normal;
66
- @include bootstrap-border-radius(4px);
78
+ @include ctb-border-radius($baseBorderRadius);
67
79
  }
68
80
  .nav-collapse .dropdown-menu li + li a {
69
81
  margin-bottom: 2px;
@@ -72,6 +84,14 @@
72
84
  .nav-collapse .dropdown-menu a:hover {
73
85
  background-color: $navbarBackground;
74
86
  }
87
+ .navbar-inverse .nav-collapse .nav > li > a,
88
+ .navbar-inverse .nav-collapse .dropdown-menu a {
89
+ color: $navbarInverseLinkColor;
90
+ }
91
+ .navbar-inverse .nav-collapse .nav > li > a:hover,
92
+ .navbar-inverse .nav-collapse .dropdown-menu a:hover {
93
+ background-color: $navbarInverseBackground;
94
+ }
75
95
  // Buttons in the navbar
76
96
  .nav-collapse.in .btn-group {
77
97
  margin-top: 5px;
@@ -83,15 +103,19 @@
83
103
  top: auto;
84
104
  left: auto;
85
105
  float: none;
86
- display: block;
106
+ display: none;
87
107
  max-width: none;
88
108
  margin: 0 15px;
89
109
  padding: 0;
90
110
  background-color: transparent;
91
111
  border: none;
92
- @include bootstrap-border-radius(0);
93
- @include bootstrap-box-shadow(none);
112
+ @include ctb-border-radius(0);
113
+ @include ctb-box-shadow(none);
94
114
  }
115
+ .nav-collapse .open > .dropdown-menu {
116
+ display: block;
117
+ }
118
+
95
119
  .nav-collapse .dropdown-menu:before,
96
120
  .nav-collapse .dropdown-menu:after {
97
121
  display: none;
@@ -99,6 +123,12 @@
99
123
  .nav-collapse .dropdown-menu .divider {
100
124
  display: none;
101
125
  }
126
+ .nav-collapse .nav > li > .dropdown-menu {
127
+ &:before,
128
+ &:after {
129
+ display: none;
130
+ }
131
+ }
102
132
  // Forms in navbar
103
133
  .nav-collapse .navbar-form,
104
134
  .nav-collapse .navbar-search {
@@ -107,7 +137,12 @@
107
137
  margin: ($baseLineHeight / 2) 0;
108
138
  border-top: 1px solid $navbarBackground;
109
139
  border-bottom: 1px solid $navbarBackground;
110
- @include bootstrap-box-shadow("inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1)");
140
+ @include ctb-box-shadow(#{inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1)});
141
+ }
142
+ .navbar-inverse .nav-collapse .navbar-form,
143
+ .navbar-inverse .nav-collapse .navbar-search {
144
+ border-top-color: $navbarInverseBackground;
145
+ border-bottom-color: $navbarInverseBackground;
111
146
  }
112
147
  // Pull right (secondary) nav content
113
148
  .navbar .nav-collapse .nav.pull-right {
@@ -131,16 +166,20 @@
131
166
  padding-left: 10px;
132
167
  padding-right: 10px;
133
168
  }
169
+
170
+
134
171
  }
135
172
 
136
173
 
137
174
  // DEFAULT DESKTOP
138
175
  // ---------------
139
176
 
140
- // Required to make the collapsing navbar work on regular desktops
141
- @media (min-width: 980px) {
177
+ @media (min-width: $navbarCollapseDesktopWidth) {
178
+
179
+ // Required to make the collapsing navbar work on regular desktops
142
180
  .nav-collapse.collapse {
143
181
  height: auto !important;
144
182
  overflow: visible !important;
145
183
  }
146
- }
184
+
185
+ }
@@ -1,5 +1,7 @@
1
- // RESPONSIVE CLASSES
2
- // ------------------
1
+ //
2
+ // Responsive: Utility classes
3
+ // --------------------------------------------------
4
+
3
5
 
4
6
  // Hide from screenreaders and browsers
5
7
  // Credit: HTML5 Boilerplate
@@ -13,29 +15,29 @@
13
15
  // For desktops
14
16
  .visible-phone { display: none !important; }
15
17
  .visible-tablet { display: none !important; }
16
- .visible-desktop { } // Don't set initially
17
18
  .hidden-phone { }
18
19
  .hidden-tablet { }
19
20
  .hidden-desktop { display: none !important; }
20
-
21
- // Phones only
22
- @media (max-width: 767px) {
23
- // Show
24
- .visible-phone { display: inherit !important; } // Use inherit to restore previous behavior
25
- // Hide
26
- .hidden-phone { display: none !important; }
27
- // Hide everything else
28
- .hidden-desktop { display: inherit !important; }
29
- .visible-desktop { display: none !important; }
30
- }
21
+ .visible-desktop { display: inherit !important; }
31
22
 
32
23
  // Tablets & small desktops only
33
24
  @media (min-width: 768px) and (max-width: 979px) {
25
+ // Hide everything else
26
+ .hidden-desktop { display: inherit !important; }
27
+ .visible-desktop { display: none !important ; }
34
28
  // Show
35
29
  .visible-tablet { display: inherit !important; }
36
30
  // Hide
37
31
  .hidden-tablet { display: none !important; }
32
+ }
33
+
34
+ // Phones only
35
+ @media (max-width: 767px) {
38
36
  // Hide everything else
39
37
  .hidden-desktop { display: inherit !important; }
40
- .visible-desktop { display: none !important ; }
38
+ .visible-desktop { display: none !important; }
39
+ // Show
40
+ .visible-phone { display: inherit !important; } // Use inherit to restore previous behavior
41
+ // Hide
42
+ .hidden-phone { display: none !important; }
41
43
  }
@@ -0,0 +1,48 @@
1
+ /*!
2
+ * Bootstrap Responsive v2.1.0
3
+ *
4
+ * Copyright 2012 Twitter, Inc
5
+ * Licensed under the Apache License v2.0
6
+ * http://www.apache.org/licenses/LICENSE-2.0
7
+ *
8
+ * Designed and built with all the love in the world @twitter by @mdo and @fat.
9
+ */
10
+
11
+
12
+ // responsive.scss
13
+ // For phone and tablet devices
14
+ // -------------------------------------------------------------
15
+
16
+
17
+ // REPEAT VARIABLES & MIXINS
18
+ // -------------------------
19
+ // Required since we compile the responsive stuff separately
20
+
21
+ @import "variables"; // Modify this for custom colors, font-sizes, etc
22
+ @import "mixins";
23
+
24
+
25
+ // RESPONSIVE CLASSES
26
+ // ------------------
27
+
28
+ @import "responsive-utilities";
29
+
30
+
31
+ // MEDIA QUERIES
32
+ // ------------------
33
+
34
+ // Large desktops
35
+ @import "responsive-1200px-min";
36
+
37
+ // Tablets to regular desktops
38
+ @import "responsive-768px-979px";
39
+
40
+ // Phones to portrait tablets and narrow desktops
41
+ @import "responsive-767px-max";
42
+
43
+
44
+ // RESPONSIVE NAVBAR
45
+ // ------------------
46
+
47
+ // From 979px and below, show a button to toggle navbar contents
48
+ @import "responsive-navbar";
@@ -1,10 +1,10 @@
1
+ //
1
2
  // Scaffolding
2
- // Basic and global styles for generating a grid system, structural layout, and page templates
3
- // -------------------------------------------------------------------------------------------
3
+ // --------------------------------------------------
4
4
 
5
5
 
6
6
  // Body reset
7
- // ----------
7
+ // -------------------------
8
8
 
9
9
  body {
10
10
  margin: 0;
@@ -17,7 +17,7 @@ body {
17
17
 
18
18
 
19
19
  // Links
20
- // -----
20
+ // -------------------------
21
21
 
22
22
  a {
23
23
  color: $linkColor;
@@ -27,3 +27,26 @@ a:hover {
27
27
  color: $linkColorHover;
28
28
  text-decoration: underline;
29
29
  }
30
+
31
+
32
+ // Images
33
+ // -------------------------
34
+
35
+ // Rounded corners
36
+ .img-rounded {
37
+ @include ctb-border-radius(6px);
38
+ }
39
+
40
+ // Add polaroid-esque trim
41
+ .img-polaroid {
42
+ padding: 4px;
43
+ background-color: #fff;
44
+ border: 1px solid #ccc;
45
+ border: 1px solid rgba(0,0,0,.2);
46
+ @include ctb-box-shadow(0 1px 3px rgba(0,0,0,.1));
47
+ }
48
+
49
+ // Perfect circle
50
+ .img-circle {
51
+ @include ctb-border-radius(500px); // crank the border-radius so it works with most reasonably sized images
52
+ }
@@ -1,6 +1,6 @@
1
- // SPRITES
2
- // Glyphs and icons for buttons, nav, and more
3
- // -------------------------------------------
1
+ //
2
+ // Sprites
3
+ // --------------------------------------------------
4
4
 
5
5
 
6
6
  // ICONS
@@ -19,16 +19,30 @@
19
19
  display: inline-block;
20
20
  width: 14px;
21
21
  height: 14px;
22
- @include bootstrap-ie7-restore-right-whitespace();
22
+ @include ctb-ie7-restore-right-whitespace();
23
23
  line-height: 14px;
24
24
  vertical-align: text-top;
25
- background-image: url("#{$iconSpritePath}");
25
+ background-image: image-url("#{$iconSpritePath}");
26
26
  background-position: 14px 14px;
27
27
  background-repeat: no-repeat;
28
-
28
+ margin-top: 1px;
29
29
  }
30
- .icon-white {
31
- background-image: url("#{$iconWhiteSpritePath}");
30
+
31
+ /* White icons with optional class, or on hover/active states of certain elements */
32
+ .icon-white,
33
+ .nav-pills > .active > a > [class^="icon-"],
34
+ .nav-pills > .active > a > [class*=" icon-"],
35
+ .nav-list > .active > a > [class^="icon-"],
36
+ .nav-list > .active > a > [class*=" icon-"],
37
+ .navbar-inverse .nav > .active > a > [class^="icon-"],
38
+ .navbar-inverse .nav > .active > a > [class*=" icon-"],
39
+ .dropdown-menu > li > a:hover > [class^="icon-"],
40
+ .dropdown-menu > li > a:hover > [class*=" icon-"],
41
+ .dropdown-menu > .active > a > [class^="icon-"],
42
+ .dropdown-menu > .active > a > [class*=" icon-"],
43
+ .dropdown-submenu:hover > a > [class^="icon-"],
44
+ .dropdown-submenu:hover > a > [class*=" icon-"] {
45
+ background-image: image-url("#{$iconWhiteSpritePath}");
32
46
  }
33
47
 
34
48
  .icon-glass { background-position: 0 0; }
@@ -145,7 +159,7 @@
145
159
  .icon-warning-sign { background-position: -144px -120px; }
146
160
  .icon-plane { background-position: -168px -120px; }
147
161
  .icon-calendar { background-position: -192px -120px; }
148
- .icon-random { background-position: -216px -120px; }
162
+ .icon-random { background-position: -216px -120px; width: 16px; }
149
163
  .icon-comment { background-position: -240px -120px; }
150
164
  .icon-magnet { background-position: -264px -120px; }
151
165
  .icon-chevron-up { background-position: -288px -120px; }
@@ -153,7 +167,7 @@
153
167
  .icon-retweet { background-position: -336px -120px; }
154
168
  .icon-shopping-cart { background-position: -360px -120px; }
155
169
  .icon-folder-close { background-position: -384px -120px; }
156
- .icon-folder-open { background-position: -408px -120px; }
170
+ .icon-folder-open { background-position: -408px -120px; width: 16px; }
157
171
  .icon-resize-vertical { background-position: -432px -119px; } // 1px, 1px off
158
172
  .icon-resize-horizontal { background-position: -456px -118px; } // 1px, 2px off
159
173
 
@@ -177,15 +191,3 @@
177
191
  .icon-filter { background-position: -408px -144px; }
178
192
  .icon-briefcase { background-position: -432px -144px; }
179
193
  .icon-fullscreen { background-position: -456px -144px; }
180
-
181
-
182
-
183
-
184
-
185
-
186
-
187
-
188
-
189
-
190
-
191
-
@@ -1,7 +1,6 @@
1
1
  //
2
- // Tables.less
3
- // Tables for, you guessed it, tabular data
4
- // ----------------------------------------
2
+ // Tables
3
+ // --------------------------------------------------
5
4
 
6
5
 
7
6
  // BASE TABLES
@@ -49,6 +48,11 @@ table {
49
48
  tbody + tbody {
50
49
  border-top: 2px solid $tableBorder;
51
50
  }
51
+
52
+ // Nesting
53
+ .table {
54
+ background-color: $bodyBackground;
55
+ }
52
56
  }
53
57
 
54
58
 
@@ -70,9 +74,9 @@ table {
70
74
  .table-bordered {
71
75
  border: 1px solid $tableBorder;
72
76
  border-collapse: separate; // Done so we can round those corners!
73
- *border-collapse: collapsed; // IE7 can't round corners anyway
77
+ *border-collapse: collapse; // IE7 can't round corners anyway
74
78
  border-left: 0;
75
- @include bootstrap-border-radius(4px);
79
+ @include ctb-border-radius($baseBorderRadius);
76
80
  th,
77
81
  td {
78
82
  border-left: 1px solid $tableBorder;
@@ -90,43 +94,62 @@ table {
90
94
  border-top: 0;
91
95
  }
92
96
  // For first th or td in the first row in the first thead or tbody
93
- thead:first-child tr:first-child th:first-child,
94
- tbody:first-child tr:first-child td:first-child {
95
- -webkit-border-top-left-radius: 4px;
96
- border-top-left-radius: 4px;
97
- -moz-border-radius-topleft: 4px;
98
- }
99
- thead:first-child tr:first-child th:last-child,
100
- tbody:first-child tr:first-child td:last-child {
101
- -webkit-border-top-right-radius: 4px;
102
- border-top-right-radius: 4px;
103
- -moz-border-radius-topright: 4px;
97
+ thead:first-child tr:first-child > th:first-child,
98
+ tbody:first-child tr:first-child > td:first-child {
99
+ @include ctb-border-top-left-radius($baseBorderRadius);
104
100
  }
105
- // For first th or td in the first row in the first thead or tbody
106
- thead:last-child tr:last-child th:first-child,
107
- tbody:last-child tr:last-child td:first-child {
108
- @include bootstrap-border-radius(0 0 0 4px);
109
- -webkit-border-bottom-left-radius: 4px;
110
- border-bottom-left-radius: 4px;
111
- -moz-border-radius-bottomleft: 4px;
112
- }
113
- thead:last-child tr:last-child th:last-child,
114
- tbody:last-child tr:last-child td:last-child {
115
- -webkit-border-bottom-right-radius: 4px;
116
- border-bottom-right-radius: 4px;
117
- -moz-border-radius-bottomright: 4px;
101
+ thead:first-child tr:first-child > th:last-child,
102
+ tbody:first-child tr:first-child > td:last-child {
103
+ @include ctb-border-top-right-radius($baseBorderRadius);
104
+ }
105
+ // For first th or td in the last row in the last thead or tbody
106
+ thead:last-child tr:last-child > th:first-child,
107
+ tbody:last-child tr:last-child > td:first-child,
108
+ tfoot:last-child tr:last-child > td:first-child {
109
+ @include ctb-border-bottom-left-radius($baseBorderRadius);
110
+ }
111
+ thead:last-child tr:last-child > th:last-child,
112
+ tbody:last-child tr:last-child > td:last-child,
113
+ tfoot:last-child tr:last-child > td:last-child {
114
+ @include ctb-border-bottom-right-radius($baseBorderRadius);
118
115
  }
116
+
117
+ // Clear border-radius for first and last td in the last row in the last tbody for table with tfoot
118
+ tfoot + tbody:last-child tr:last-child td:first-child {
119
+ @include ctb-border-bottom-left-radius(0);
120
+ }
121
+ tfoot + tbody:last-child tr:last-child td:last-child {
122
+ @include ctb-border-bottom-right-radius(0);
123
+ }
124
+
125
+
126
+ // Special fixes to round the left border on the first td/th
127
+ caption + thead tr:first-child th:first-child,
128
+ caption + tbody tr:first-child td:first-child,
129
+ colgroup + thead tr:first-child th:first-child,
130
+ colgroup + tbody tr:first-child td:first-child {
131
+ @include ctb-border-top-left-radius($baseBorderRadius);
132
+ }
133
+ caption + thead tr:first-child th:last-child,
134
+ caption + tbody tr:first-child td:last-child,
135
+ colgroup + thead tr:first-child th:last-child,
136
+ colgroup + tbody tr:first-child td:last-child {
137
+ @include ctb-border-top-right-radius($baseBorderRadius);
138
+ }
139
+
119
140
  }
120
141
 
121
142
 
143
+
144
+
122
145
  // ZEBRA-STRIPING
123
146
  // --------------
124
147
 
125
148
  // Default zebra-stripe styles (alternating gray and transparent backgrounds)
126
149
  .table-striped {
127
150
  tbody {
128
- tr:nth-child(odd) td,
129
- tr:nth-child(odd) th {
151
+ > tr:nth-child(odd) > td,
152
+ > tr:nth-child(odd) > th {
130
153
  background-color: $tableBackgroundAccent;
131
154
  }
132
155
  }
@@ -136,10 +159,12 @@ table {
136
159
  // HOVER EFFECT
137
160
  // ------------
138
161
  // Placed here since it has to come after the potential zebra striping
139
- .table {
140
- tbody tr:hover td,
141
- tbody tr:hover th {
142
- background-color: $tableBackgroundHover;
162
+ .table-hover {
163
+ tbody {
164
+ tr:hover td,
165
+ tr:hover th {
166
+ background-color: $tableBackgroundHover;
167
+ }
143
168
  }
144
169
  }
145
170
 
@@ -147,30 +172,66 @@ table {
147
172
  // TABLE CELL SIZING
148
173
  // -----------------
149
174
 
150
- // Change the columns
151
- table {
152
- .span1 { @include bootstrap-tableColumns(1); }
153
- .span2 { @include bootstrap-tableColumns(2); }
154
- .span3 { @include bootstrap-tableColumns(3); }
155
- .span4 { @include bootstrap-tableColumns(4); }
156
- .span5 { @include bootstrap-tableColumns(5); }
157
- .span6 { @include bootstrap-tableColumns(6); }
158
- .span7 { @include bootstrap-tableColumns(7); }
159
- .span8 { @include bootstrap-tableColumns(8); }
160
- .span9 { @include bootstrap-tableColumns(9); }
161
- .span10 { @include bootstrap-tableColumns(10); }
162
- .span11 { @include bootstrap-tableColumns(11); }
163
- .span12 { @include bootstrap-tableColumns(12); }
164
- .span13 { @include bootstrap-tableColumns(13); }
165
- .span14 { @include bootstrap-tableColumns(14); }
166
- .span15 { @include bootstrap-tableColumns(15); }
167
- .span16 { @include bootstrap-tableColumns(16); }
168
- .span17 { @include bootstrap-tableColumns(17); }
169
- .span18 { @include bootstrap-tableColumns(18); }
170
- .span19 { @include bootstrap-tableColumns(19); }
171
- .span20 { @include bootstrap-tableColumns(20); }
172
- .span21 { @include bootstrap-tableColumns(21); }
173
- .span22 { @include bootstrap-tableColumns(22); }
174
- .span23 { @include bootstrap-tableColumns(23); }
175
- .span24 { @include bootstrap-tableColumns(24); }
175
+ // Reset default grid behavior
176
+ table td[class*="span"],
177
+ table th[class*="span"],
178
+ .row-fluid table td[class*="span"],
179
+ .row-fluid table th[class*="span"] {
180
+ display: table-cell;
181
+ float: none; // undo default grid column styles
182
+ margin-left: 0; // undo default grid column styles
183
+ }
184
+
185
+ // Change the column widths to account for td/th padding
186
+ .table td,
187
+ .table th {
188
+ &.span1 { @include ctb-tableColumns(1); }
189
+ &.span2 { @include ctb-tableColumns(2); }
190
+ &.span3 { @include ctb-tableColumns(3); }
191
+ &.span4 { @include ctb-tableColumns(4); }
192
+ &.span5 { @include ctb-tableColumns(5); }
193
+ &.span6 { @include ctb-tableColumns(6); }
194
+ &.span7 { @include ctb-tableColumns(7); }
195
+ &.span8 { @include ctb-tableColumns(8); }
196
+ &.span9 { @include ctb-tableColumns(9); }
197
+ &.span10 { @include ctb-tableColumns(10); }
198
+ &.span11 { @include ctb-tableColumns(11); }
199
+ &.span12 { @include ctb-tableColumns(12); }
200
+ }
201
+
202
+
203
+
204
+ // TABLE BACKGROUNDS
205
+ // -----------------
206
+ // Exact selectors below required to override .table-striped
207
+
208
+ .table tbody tr {
209
+ &.success td {
210
+ background-color: $successBackground;
211
+ }
212
+ &.error td {
213
+ background-color: $errorBackground;
214
+ }
215
+ &.warning td {
216
+ background-color: $warningBackground;
217
+ }
218
+ &.info td {
219
+ background-color: $infoBackground;
220
+ }
221
+ }
222
+
223
+ // Hover states for .table-hover
224
+ .table-hover tbody tr {
225
+ &.success:hover td {
226
+ background-color: darken($successBackground, 5%);
227
+ }
228
+ &.error:hover td {
229
+ background-color: darken($errorBackground, 5%);
230
+ }
231
+ &.warning:hover td {
232
+ background-color: darken($warningBackground, 5%);
233
+ }
234
+ &.info:hover td {
235
+ background-color: darken($infoBackground, 5%);
236
+ }
176
237
  }