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,16 +1,25 @@
1
+ //
2
+ // Responsive: Navbar
3
+ // --------------------------------------------------
4
+
1
5
  // TABLETS AND BELOW
2
6
  // -----------------
3
- @media (max-width: 979px)
7
+ @media (max-width: $navbarCollapseWidth)
4
8
  // UNFIX THE TOPBAR
5
9
  // ----------------
6
10
  // Remove any padding from the body
7
11
  body
8
12
  padding-top: 0
9
- // Unfix the navbar
10
- .navbar-fixed-top
13
+ // Unfix the navbars
14
+ .navbar-fixed-top,
15
+ .navbar-fixed-bottom
11
16
  position: static
17
+ .navbar-fixed-top
12
18
  margin-bottom: $baseLineHeight
13
- .navbar-fixed-top .navbar-inner
19
+ .navbar-fixed-bottom
20
+ margin-top: $baseLineHeight
21
+ .navbar-fixed-top .navbar-inner,
22
+ .navbar-fixed-bottom .navbar-inner
14
23
  padding: 5px
15
24
  .navbar .container
16
25
  width: auto
@@ -41,20 +50,26 @@
41
50
  // Nav and dropdown links in navbar
42
51
  .nav-collapse .nav > li > a,
43
52
  .nav-collapse .dropdown-menu a
44
- padding: 6px 15px
53
+ padding: 9px 15px
45
54
  font-weight: bold
46
55
  color: $navbarLinkColor
47
- +bootstrap-border-radius(3px)
56
+ +ctb-border-radius(3px)
48
57
  // Buttons
49
58
  .nav-collapse .btn
50
59
  padding: 4px 10px 4px
51
60
  font-weight: normal
52
- +bootstrap-border-radius(4px)
61
+ +ctb-border-radius($baseBorderRadius)
53
62
  .nav-collapse .dropdown-menu li + li a
54
63
  margin-bottom: 2px
55
64
  .nav-collapse .nav > li > a:hover,
56
65
  .nav-collapse .dropdown-menu a:hover
57
66
  background-color: $navbarBackground
67
+ .navbar-inverse .nav-collapse .nav > li > a,
68
+ .navbar-inverse .nav-collapse .dropdown-menu a
69
+ color: $navbarInverseLinkColor
70
+ .navbar-inverse .nav-collapse .nav > li > a:hover,
71
+ .navbar-inverse .nav-collapse .dropdown-menu a:hover
72
+ background-color: $navbarInverseBackground
58
73
  // Buttons in the navbar
59
74
  .nav-collapse.in .btn-group
60
75
  margin-top: 5px
@@ -65,19 +80,25 @@
65
80
  top: auto
66
81
  left: auto
67
82
  float: none
68
- display: block
83
+ display: none
69
84
  max-width: none
70
85
  margin: 0 15px
71
86
  padding: 0
72
87
  background-color: transparent
73
88
  border: none
74
- +bootstrap-border-radius(0)
75
- +bootstrap-box-shadow(none)
89
+ +ctb-border-radius(0)
90
+ +ctb-box-shadow(none)
91
+ .nav-collapse .open > .dropdown-menu
92
+ display: block
76
93
  .nav-collapse .dropdown-menu:before,
77
94
  .nav-collapse .dropdown-menu:after
78
95
  display: none
79
96
  .nav-collapse .dropdown-menu .divider
80
97
  display: none
98
+ .nav-collapse .nav > li > .dropdown-menu
99
+ &:before,
100
+ &:after
101
+ display: none
81
102
  // Forms in navbar
82
103
  .nav-collapse .navbar-form,
83
104
  .nav-collapse .navbar-search
@@ -86,7 +107,11 @@
86
107
  margin: $baseLineHeight / 2 0
87
108
  border-top: 1px solid $navbarBackground
88
109
  border-bottom: 1px solid $navbarBackground
89
- +bootstrap-box-shadow("inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1)")
110
+ +ctb-box-shadow(#{inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1)})
111
+ .navbar-inverse .nav-collapse .navbar-form,
112
+ .navbar-inverse .nav-collapse .navbar-search
113
+ border-top-color: $navbarInverseBackground
114
+ border-bottom-color: $navbarInverseBackground
90
115
  // Pull right (secondary) nav content
91
116
  .navbar .nav-collapse .nav.pull-right
92
117
  float: none
@@ -108,8 +133,8 @@
108
133
  // DEFAULT DESKTOP
109
134
  // ---------------
110
135
 
111
- // Required to make the collapsing navbar work on regular desktops
112
- @media (min-width: 980px)
136
+ @media (min-width: $navbarCollapseDesktopWidth)
137
+ // Required to make the collapsing navbar work on regular desktops
113
138
  .nav-collapse.collapse
114
139
  height: auto !important
115
140
  overflow: visible !important
@@ -1,5 +1,6 @@
1
- // RESPONSIVE CLASSES
2
- // ------------------
1
+ //
2
+ // Responsive: Utility classes
3
+ // --------------------------------------------------
3
4
 
4
5
  // Hide from screenreaders and browsers
5
6
  // Credit: HTML5 Boilerplate
@@ -16,9 +17,6 @@
16
17
  .visible-tablet
17
18
  display: none !important
18
19
 
19
- .visible-desktop
20
-
21
- // Don't set initially
22
20
  .hidden-phone
23
21
 
24
22
  .hidden-tablet
@@ -26,31 +24,34 @@
26
24
  .hidden-desktop
27
25
  display: none !important
28
26
 
29
- // Phones only
30
- @media (max-width: 767px)
31
- // Show
32
- .visible-phone
33
- display: inherit !important
34
- // Use inherit to restore previous behavior
35
- // Hide
36
- .hidden-phone
37
- display: none !important
27
+ .visible-desktop
28
+ display: inherit !important
29
+
30
+ // Tablets & small desktops only
31
+ @media (min-width: 768px) and (max-width: 979px)
38
32
  // Hide everything else
39
33
  .hidden-desktop
40
34
  display: inherit !important
41
35
  .visible-desktop
42
36
  display: none !important
43
-
44
- // Tablets & small desktops only
45
- @media (min-width: 768px) and (max-width: 979px)
46
37
  // Show
47
38
  .visible-tablet
48
39
  display: inherit !important
49
40
  // Hide
50
41
  .hidden-tablet
51
42
  display: none !important
43
+
44
+ // Phones only
45
+ @media (max-width: 767px)
52
46
  // Hide everything else
53
47
  .hidden-desktop
54
48
  display: inherit !important
55
49
  .visible-desktop
56
50
  display: none !important
51
+ // Show
52
+ .visible-phone
53
+ display: inherit !important
54
+ // Use inherit to restore previous behavior
55
+ // Hide
56
+ .hidden-phone
57
+ display: none !important
@@ -0,0 +1,44 @@
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
+ // responsive.scss
11
+ // For phone and tablet devices
12
+ // -------------------------------------------------------------
13
+
14
+ // REPEAT VARIABLES & MIXINS
15
+ // -------------------------
16
+ // Required since we compile the responsive stuff separately
17
+
18
+ @import variables
19
+
20
+ // Modify this for custom colors, font-sizes, etc
21
+ @import mixins
22
+
23
+ // RESPONSIVE CLASSES
24
+ // ------------------
25
+
26
+ @import responsive-utilities
27
+
28
+ // MEDIA QUERIES
29
+ // ------------------
30
+
31
+ // Large desktops
32
+ @import responsive-1200px-min
33
+
34
+ // Tablets to regular desktops
35
+ @import responsive-768px-979px
36
+
37
+ // Phones to portrait tablets and narrow desktops
38
+ @import responsive-767px-max
39
+
40
+ // RESPONSIVE NAVBAR
41
+ // ------------------
42
+
43
+ // From 979px and below, show a button to toggle navbar contents
44
+ @import responsive-navbar
@@ -1,9 +1,9 @@
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
  // Body reset
6
- // ----------
6
+ // -------------------------
7
7
 
8
8
  body
9
9
  margin: 0
@@ -14,7 +14,7 @@ body
14
14
  background-color: $bodyBackground
15
15
 
16
16
  // Links
17
- // -----
17
+ // -------------------------
18
18
 
19
19
  a
20
20
  color: $linkColor
@@ -23,3 +23,23 @@ a
23
23
  a:hover
24
24
  color: $linkColorHover
25
25
  text-decoration: underline
26
+
27
+ // Images
28
+ // -------------------------
29
+
30
+ // Rounded corners
31
+ .img-rounded
32
+ +ctb-border-radius(6px)
33
+
34
+ // Add polaroid-esque trim
35
+ .img-polaroid
36
+ padding: 4px
37
+ background-color: #fff
38
+ border: 1px solid #ccc
39
+ border: 1px solid rgba(0, 0, 0, 0.2)
40
+ +ctb-box-shadow(0 1px 3px rgba(0, 0, 0, 0.1))
41
+
42
+ // Perfect circle
43
+ .img-circle
44
+ +ctb-border-radius(500px)
45
+ // crank the border-radius so it works with most reasonably sized images
@@ -1,6 +1,6 @@
1
- // SPRITES
2
- // Glyphs and icons for buttons, nav, and more
3
- // -------------------------------------------
1
+ //
2
+ // Sprites
3
+ // --------------------------------------------------
4
4
 
5
5
  // ICONS
6
6
  // -----
@@ -18,15 +18,30 @@
18
18
  display: inline-block
19
19
  width: 14px
20
20
  height: 14px
21
- +bootstrap-ie7-restore-right-whitespace
21
+ +ctb-ie7-restore-right-whitespace
22
22
  line-height: 14px
23
23
  vertical-align: text-top
24
- background-image: url(#{$iconSpritePath})
24
+ background-image: image-url(#{$iconSpritePath})
25
25
  background-position: 14px 14px
26
26
  background-repeat: no-repeat
27
-
28
- .icon-white
29
- background-image: url(#{$iconWhiteSpritePath})
27
+ margin-top: 1px
28
+
29
+ /* White icons with optional class, or on hover/active states of certain elements
30
+
31
+ .icon-white,
32
+ .nav-pills > .active > a > [class^="icon-"],
33
+ .nav-pills > .active > a > [class*=" icon-"],
34
+ .nav-list > .active > a > [class^="icon-"],
35
+ .nav-list > .active > a > [class*=" icon-"],
36
+ .navbar-inverse .nav > .active > a > [class^="icon-"],
37
+ .navbar-inverse .nav > .active > a > [class*=" icon-"],
38
+ .dropdown-menu > li > a:hover > [class^="icon-"],
39
+ .dropdown-menu > li > a:hover > [class*=" icon-"],
40
+ .dropdown-menu > .active > a > [class^="icon-"],
41
+ .dropdown-menu > .active > a > [class*=" icon-"],
42
+ .dropdown-submenu:hover > a > [class^="icon-"],
43
+ .dropdown-submenu:hover > a > [class*=" icon-"]
44
+ background-image: image-url(#{$iconWhiteSpritePath})
30
45
 
31
46
  .icon-glass
32
47
  background-position: 0 0
@@ -361,6 +376,7 @@
361
376
 
362
377
  .icon-random
363
378
  background-position: -216px -120px
379
+ width: 16px
364
380
 
365
381
  .icon-comment
366
382
  background-position: -240px -120px
@@ -386,6 +402,7 @@
386
402
 
387
403
  .icon-folder-open
388
404
  background-position: -408px -120px
405
+ width: 16px
389
406
 
390
407
  .icon-resize-vertical
391
408
  background-position: -432px -119px
@@ -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
  // BASE TABLES
7
6
  // -----------------
@@ -42,6 +41,9 @@ table
42
41
  // Account for multiple tbody instances
43
42
  tbody + tbody
44
43
  border-top: 2px solid $tableBorder
44
+ // Nesting
45
+ .table
46
+ background-color: $bodyBackground
45
47
 
46
48
  // CONDENSED TABLE W/ HALF PADDING
47
49
  // -------------------------------
@@ -58,10 +60,10 @@ table
58
60
  border: 1px solid $tableBorder
59
61
  border-collapse: separate
60
62
  // Done so we can round those corners!
61
- *border-collapse: collapsed
63
+ *border-collapse: collapse
62
64
  // IE7 can't round corners anyway
63
65
  border-left: 0
64
- +bootstrap-border-radius(4px)
66
+ +ctb-border-radius($baseBorderRadius)
65
67
  th,
66
68
  td
67
69
  border-left: 1px solid $tableBorder
@@ -77,28 +79,37 @@ table
77
79
  tbody:first-child tr:first-child td
78
80
  border-top: 0
79
81
  // For first th or td in the first row in the first thead or tbody
80
- thead:first-child tr:first-child th:first-child,
81
- tbody:first-child tr:first-child td:first-child
82
- -webkit-border-top-left-radius: 4px
83
- border-top-left-radius: 4px
84
- -moz-border-radius-topleft: 4px
85
- thead:first-child tr:first-child th:last-child,
86
- tbody:first-child tr:first-child td:last-child
87
- -webkit-border-top-right-radius: 4px
88
- border-top-right-radius: 4px
89
- -moz-border-radius-topright: 4px
90
- // For first th or td in the first row in the first thead or tbody
91
- thead:last-child tr:last-child th:first-child,
92
- tbody:last-child tr:last-child td:first-child
93
- +bootstrap-border-radius(0 0 0 4px)
94
- -webkit-border-bottom-left-radius: 4px
95
- border-bottom-left-radius: 4px
96
- -moz-border-radius-bottomleft: 4px
97
- thead:last-child tr:last-child th:last-child,
98
- tbody:last-child tr:last-child td:last-child
99
- -webkit-border-bottom-right-radius: 4px
100
- border-bottom-right-radius: 4px
101
- -moz-border-radius-bottomright: 4px
82
+ thead:first-child tr:first-child > th:first-child,
83
+ tbody:first-child tr:first-child > td:first-child
84
+ +ctb-border-top-left-radius($baseBorderRadius)
85
+ thead:first-child tr:first-child > th:last-child,
86
+ tbody:first-child tr:first-child > td:last-child
87
+ +ctb-border-top-right-radius($baseBorderRadius)
88
+ // For first th or td in the last row in the last thead or tbody
89
+ thead:last-child tr:last-child > th:first-child,
90
+ tbody:last-child tr:last-child > td:first-child,
91
+ tfoot:last-child tr:last-child > td:first-child
92
+ +ctb-border-bottom-left-radius($baseBorderRadius)
93
+ thead:last-child tr:last-child > th:last-child,
94
+ tbody:last-child tr:last-child > td:last-child,
95
+ tfoot:last-child tr:last-child > td:last-child
96
+ +ctb-border-bottom-right-radius($baseBorderRadius)
97
+ // Clear border-radius for first and last td in the last row in the last tbody for table with tfoot
98
+ tfoot + tbody:last-child tr:last-child td:first-child
99
+ +ctb-border-bottom-left-radius(0)
100
+ tfoot + tbody:last-child tr:last-child td:last-child
101
+ +ctb-border-bottom-right-radius(0)
102
+ // Special fixes to round the left border on the first td/th
103
+ caption + thead tr:first-child th:first-child,
104
+ caption + tbody tr:first-child td:first-child,
105
+ colgroup + thead tr:first-child th:first-child,
106
+ colgroup + tbody tr:first-child td:first-child
107
+ +ctb-border-top-left-radius($baseBorderRadius)
108
+ caption + thead tr:first-child th:last-child,
109
+ caption + tbody tr:first-child td:last-child,
110
+ colgroup + thead tr:first-child th:last-child,
111
+ colgroup + tbody tr:first-child td:last-child
112
+ +ctb-border-top-right-radius($baseBorderRadius)
102
113
 
103
114
  // ZEBRA-STRIPING
104
115
  // --------------
@@ -106,68 +117,84 @@ table
106
117
  // Default zebra-stripe styles (alternating gray and transparent backgrounds)
107
118
  .table-striped
108
119
  tbody
109
- tr:nth-child(odd) td,
110
- tr:nth-child(odd) th
120
+ > tr:nth-child(odd) > td,
121
+ > tr:nth-child(odd) > th
111
122
  background-color: $tableBackgroundAccent
112
123
 
113
124
  // HOVER EFFECT
114
125
  // ------------
115
126
  // Placed here since it has to come after the potential zebra striping
116
- .table
117
- tbody tr:hover td,
118
- tbody tr:hover th
119
- background-color: $tableBackgroundHover
127
+ .table-hover
128
+ tbody
129
+ tr:hover td,
130
+ tr:hover th
131
+ background-color: $tableBackgroundHover
120
132
 
121
133
  // TABLE CELL SIZING
122
134
  // -----------------
123
135
 
124
- // Change the columns
125
- table
126
- .span1
127
- +bootstrap-tableColumns(1)
128
- .span2
129
- +bootstrap-tableColumns(2)
130
- .span3
131
- +bootstrap-tableColumns(3)
132
- .span4
133
- +bootstrap-tableColumns(4)
134
- .span5
135
- +bootstrap-tableColumns(5)
136
- .span6
137
- +bootstrap-tableColumns(6)
138
- .span7
139
- +bootstrap-tableColumns(7)
140
- .span8
141
- +bootstrap-tableColumns(8)
142
- .span9
143
- +bootstrap-tableColumns(9)
144
- .span10
145
- +bootstrap-tableColumns(10)
146
- .span11
147
- +bootstrap-tableColumns(11)
148
- .span12
149
- +bootstrap-tableColumns(12)
150
- .span13
151
- +bootstrap-tableColumns(13)
152
- .span14
153
- +bootstrap-tableColumns(14)
154
- .span15
155
- +bootstrap-tableColumns(15)
156
- .span16
157
- +bootstrap-tableColumns(16)
158
- .span17
159
- +bootstrap-tableColumns(17)
160
- .span18
161
- +bootstrap-tableColumns(18)
162
- .span19
163
- +bootstrap-tableColumns(19)
164
- .span20
165
- +bootstrap-tableColumns(20)
166
- .span21
167
- +bootstrap-tableColumns(21)
168
- .span22
169
- +bootstrap-tableColumns(22)
170
- .span23
171
- +bootstrap-tableColumns(23)
172
- .span24
173
- +bootstrap-tableColumns(24)
136
+ // Reset default grid behavior
137
+
138
+ table td[class*="span"],
139
+ table th[class*="span"],
140
+ .row-fluid table td[class*="span"],
141
+ .row-fluid table th[class*="span"]
142
+ display: table-cell
143
+ float: none
144
+ // undo default grid column styles
145
+ margin-left: 0
146
+ // undo default grid column styles
147
+
148
+ // Change the column widths to account for td/th padding
149
+
150
+ .table td,
151
+ .table th
152
+ &.span1
153
+ +ctb-tableColumns(1)
154
+ &.span2
155
+ +ctb-tableColumns(2)
156
+ &.span3
157
+ +ctb-tableColumns(3)
158
+ &.span4
159
+ +ctb-tableColumns(4)
160
+ &.span5
161
+ +ctb-tableColumns(5)
162
+ &.span6
163
+ +ctb-tableColumns(6)
164
+ &.span7
165
+ +ctb-tableColumns(7)
166
+ &.span8
167
+ +ctb-tableColumns(8)
168
+ &.span9
169
+ +ctb-tableColumns(9)
170
+ &.span10
171
+ +ctb-tableColumns(10)
172
+ &.span11
173
+ +ctb-tableColumns(11)
174
+ &.span12
175
+ +ctb-tableColumns(12)
176
+
177
+ // TABLE BACKGROUNDS
178
+ // -----------------
179
+ // Exact selectors below required to override .table-striped
180
+
181
+ .table tbody tr
182
+ &.success td
183
+ background-color: $successBackground
184
+ &.error td
185
+ background-color: $errorBackground
186
+ &.warning td
187
+ background-color: $warningBackground
188
+ &.info td
189
+ background-color: $infoBackground
190
+
191
+ // Hover states for .table-hover
192
+ .table-hover tbody tr
193
+ &.success:hover td
194
+ background-color: darken($successBackground, 5%)
195
+ &.error:hover td
196
+ background-color: darken($errorBackground, 5%)
197
+ &.warning:hover td
198
+ background-color: darken($warningBackground, 5%)
199
+ &.info:hover td
200
+ background-color: darken($infoBackground, 5%)