padrino-admin 0.11.2 → 0.11.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (98) hide show
  1. data/lib/padrino-admin/bootstrap-less/accordion.less +6 -9
  2. data/lib/padrino-admin/bootstrap-less/alerts.less +46 -51
  3. data/lib/padrino-admin/bootstrap-less/badges.less +2 -7
  4. data/lib/padrino-admin/bootstrap-less/bootstrap.less +0 -1
  5. data/lib/padrino-admin/bootstrap-less/breadcrumbs.less +3 -3
  6. data/lib/padrino-admin/bootstrap-less/button-groups.less +37 -37
  7. data/lib/padrino-admin/bootstrap-less/buttons.less +52 -67
  8. data/lib/padrino-admin/bootstrap-less/carousel.less +24 -35
  9. data/lib/padrino-admin/bootstrap-less/close.less +14 -13
  10. data/lib/padrino-admin/bootstrap-less/code.less +4 -7
  11. data/lib/padrino-admin/bootstrap-less/component-animations.less +2 -11
  12. data/lib/padrino-admin/bootstrap-less/dropdowns.less +26 -82
  13. data/lib/padrino-admin/bootstrap-less/font-awesome-ie7.less +1895 -292
  14. data/lib/padrino-admin/bootstrap-less/font-awesome.less +26 -530
  15. data/lib/padrino-admin/bootstrap-less/font-awesome/bootstrap.less +84 -0
  16. data/lib/padrino-admin/bootstrap-less/font-awesome/core.less +129 -0
  17. data/lib/padrino-admin/bootstrap-less/font-awesome/extras.less +93 -0
  18. data/lib/padrino-admin/bootstrap-less/font-awesome/font-awesome-ie7.less +1953 -0
  19. data/lib/padrino-admin/bootstrap-less/font-awesome/font-awesome.less +33 -0
  20. data/lib/padrino-admin/bootstrap-less/font-awesome/icons.less +381 -0
  21. data/lib/padrino-admin/bootstrap-less/font-awesome/mixins.less +48 -0
  22. data/lib/padrino-admin/bootstrap-less/font-awesome/path.less +14 -0
  23. data/lib/padrino-admin/bootstrap-less/font-awesome/variables.less +735 -0
  24. data/lib/padrino-admin/bootstrap-less/forms.less +123 -227
  25. data/lib/padrino-admin/bootstrap-less/grid.less +174 -19
  26. data/lib/padrino-admin/bootstrap-less/jumbotron.less +4 -4
  27. data/lib/padrino-admin/bootstrap-less/labels.less +52 -28
  28. data/lib/padrino-admin/bootstrap-less/list-group.less +37 -44
  29. data/lib/padrino-admin/bootstrap-less/media.less +1 -1
  30. data/lib/padrino-admin/bootstrap-less/mixins.less +97 -120
  31. data/lib/padrino-admin/bootstrap-less/modals.less +5 -4
  32. data/lib/padrino-admin/bootstrap-less/navbar.less +148 -174
  33. data/lib/padrino-admin/bootstrap-less/navs.less +145 -164
  34. data/lib/padrino-admin/bootstrap-less/padrino-admin.less +2 -2
  35. data/lib/padrino-admin/bootstrap-less/pager.less +45 -33
  36. data/lib/padrino-admin/bootstrap-less/pagination.less +11 -23
  37. data/lib/padrino-admin/bootstrap-less/panels.less +11 -1
  38. data/lib/padrino-admin/bootstrap-less/popovers.less +6 -6
  39. data/lib/padrino-admin/bootstrap-less/print.less +13 -2
  40. data/lib/padrino-admin/bootstrap-less/progress-bars.less +3 -3
  41. data/lib/padrino-admin/bootstrap-less/responsive-utilities.less +92 -32
  42. data/lib/padrino-admin/bootstrap-less/scaffolding.less +9 -18
  43. data/lib/padrino-admin/bootstrap-less/tables.less +70 -67
  44. data/lib/padrino-admin/bootstrap-less/thumbnails.less +6 -6
  45. data/lib/padrino-admin/bootstrap-less/tooltip.less +25 -1
  46. data/lib/padrino-admin/bootstrap-less/type.less +39 -46
  47. data/lib/padrino-admin/bootstrap-less/variables.less +135 -63
  48. data/lib/padrino-admin/generators/admin_app.rb +9 -0
  49. data/lib/padrino-admin/generators/admin_page.rb +9 -0
  50. data/lib/padrino-admin/generators/orm.rb +1 -10
  51. data/lib/padrino-admin/generators/templates/account/activerecord.rb.tt +1 -1
  52. data/lib/padrino-admin/generators/templates/account/datamapper.rb.tt +1 -1
  53. data/lib/padrino-admin/generators/templates/account/minirecord.rb.tt +1 -1
  54. data/lib/padrino-admin/generators/templates/account/mongoid.rb.tt +1 -1
  55. data/lib/padrino-admin/generators/templates/account/mongomapper.rb.tt +1 -1
  56. data/lib/padrino-admin/generators/templates/account/sequel.rb.tt +1 -1
  57. data/lib/padrino-admin/generators/templates/assets/images/font/FontAwesome.otf +0 -0
  58. data/lib/padrino-admin/generators/templates/assets/images/font/fontawesome-webfont.eot +0 -0
  59. data/lib/padrino-admin/generators/templates/assets/images/font/fontawesome-webfont.svg +153 -38
  60. data/lib/padrino-admin/generators/templates/assets/images/font/fontawesome-webfont.ttf +0 -0
  61. data/lib/padrino-admin/generators/templates/assets/images/font/fontawesome-webfont.woff +0 -0
  62. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/affix.js +120 -0
  63. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/{bootstrap-alert.js → alert.js} +32 -35
  64. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/bootstrap.min.js +1 -1
  65. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/{bootstrap-button.js → button.js} +37 -37
  66. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/carousel.js +210 -0
  67. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/collapse.js +156 -0
  68. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/dropdown.js +155 -0
  69. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/modal.js +243 -0
  70. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/popover.js +111 -0
  71. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/scrollspy.js +156 -0
  72. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/tab.js +133 -0
  73. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/tooltip.js +356 -0
  74. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/transition.js +47 -0
  75. data/lib/padrino-admin/generators/templates/assets/stylesheets/bootstrap.css +406 -452
  76. data/lib/padrino-admin/generators/templates/erb/app/layouts/application.erb.tt +3 -3
  77. data/lib/padrino-admin/generators/templates/erb/app/sessions/new.erb.tt +1 -1
  78. data/lib/padrino-admin/generators/templates/haml/app/layouts/application.haml.tt +3 -3
  79. data/lib/padrino-admin/generators/templates/haml/app/sessions/new.haml.tt +1 -1
  80. data/lib/padrino-admin/generators/templates/page/controller.rb.tt +1 -1
  81. data/lib/padrino-admin/generators/templates/slim/app/layouts/application.slim.tt +3 -3
  82. data/lib/padrino-admin/generators/templates/slim/app/sessions/new.slim.tt +1 -1
  83. data/lib/padrino-admin/helpers/view_helpers.rb +1 -1
  84. data/test/generators/test_admin_app_generator.rb +9 -0
  85. data/test/generators/test_admin_page_generator.rb +11 -0
  86. metadata +27 -23
  87. data/lib/padrino-admin/bootstrap-less/glyphicons.less +0 -200
  88. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/bootstrap-affix.js +0 -117
  89. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/bootstrap-carousel.js +0 -207
  90. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/bootstrap-collapse.js +0 -167
  91. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/bootstrap-dropdown.js +0 -165
  92. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/bootstrap-modal.js +0 -251
  93. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/bootstrap-popover.js +0 -114
  94. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/bootstrap-scrollspy.js +0 -162
  95. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/bootstrap-tab.js +0 -144
  96. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/bootstrap-tooltip.js +0 -361
  97. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/bootstrap-transition.js +0 -60
  98. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/bootstrap-typeahead.js +0 -335
@@ -3,7 +3,8 @@
3
3
  // --------------------------------------------------
4
4
  .pagination {
5
5
  display: inline-block;
6
- margin: @line-height-base 0;
6
+ padding-left: 0;
7
+ margin: @line-height-computed 0;
7
8
  border-radius: @border-radius-base;
8
9
  }
9
10
  .pagination > li {
@@ -27,14 +28,14 @@
27
28
  }
28
29
  .pagination > .active > a,
29
30
  .pagination > .active > span {
30
- color: @grayLight;
31
+ color: @gray-light;
31
32
  cursor: default;
32
33
  }
33
34
  .pagination > .disabled > span,
34
35
  .pagination > .disabled > a,
35
36
  .pagination > .disabled > a:hover,
36
37
  .pagination > .disabled > a:focus {
37
- color: @grayLight;
38
+ color: @gray-light;
38
39
  background-color: @pagination-bg;
39
40
  cursor: default;
40
41
  }
@@ -56,7 +57,7 @@
56
57
  .pagination-large {
57
58
  > li > a,
58
59
  > li > span {
59
- padding: @padding-large;
60
+ padding: @padding-large-vertical @padding-large-horizontal;
60
61
  font-size: @font-size-large;
61
62
  }
62
63
  > li:first-child > a,
@@ -69,9 +70,13 @@
69
70
  }
70
71
  }
71
72
 
72
- // Small and mini
73
- .pagination-mini,
73
+ // Small
74
74
  .pagination-small {
75
+ > li > a,
76
+ > li > span {
77
+ padding: @padding-small-vertical @padding-small-horizontal;
78
+ font-size: @font-size-small;
79
+ }
75
80
  > li:first-child > a,
76
81
  > li:first-child > span {
77
82
  .border-left-radius(@border-radius-small);
@@ -81,20 +86,3 @@
81
86
  .border-right-radius(@border-radius-small);
82
87
  }
83
88
  }
84
-
85
- // Small
86
- .pagination-small {
87
- > li > a,
88
- > li > span {
89
- padding: @padding-small;
90
- font-size: @font-size-small;
91
- }
92
- }
93
- // Mini
94
- .pagination-mini {
95
- > li > a,
96
- > li > span {
97
- padding: @padding-mini;
98
- font-size: @font-size-mini;
99
- }
100
- }
@@ -17,7 +17,7 @@
17
17
  .panel-heading {
18
18
  margin: -15px -15px 15px;
19
19
  padding: 10px 15px;
20
- font-size: @font-size-base * 1.25;
20
+ font-size: (@font-size-base * 1.25);
21
21
  font-weight: 500;
22
22
  background-color: @panel-heading-bg;
23
23
  border-bottom: 1px solid @panel-border;
@@ -25,6 +25,16 @@
25
25
  border-top-right-radius: (@panel-border-radius - 1);
26
26
  }
27
27
 
28
+ // Optional footer (stays gray in every modifier class)
29
+ .panel-footer {
30
+ margin: 15px -15px -15px;
31
+ padding: 10px 15px;
32
+ background-color: @panel-footer-bg;
33
+ border-top: 1px solid @panel-border;
34
+ border-bottom-left-radius: (@panel-border-radius - 1);
35
+ border-bottom-right-radius: (@panel-border-radius - 1);
36
+ }
37
+
28
38
  // Contextual variations
29
39
  .panel-primary {
30
40
  border-color: @panel-primary-border;
@@ -15,7 +15,7 @@
15
15
  background-color: @popover-bg;
16
16
  -webkit-bg-clip: padding-box;
17
17
  -moz-bg-clip: padding;
18
- background-clip: padding-box;
18
+ background-clip: padding-box;
19
19
  border: 1px solid #ccc;
20
20
  border: 1px solid rgba(0,0,0,.2);
21
21
  border-radius: 6px;
@@ -34,16 +34,12 @@
34
34
  .popover-title {
35
35
  margin: 0; // reset heading margin
36
36
  padding: 8px 14px;
37
- font-size: 14px;
37
+ font-size: @font-size-base;
38
38
  font-weight: normal;
39
39
  line-height: 18px;
40
40
  background-color: @popover-title-bg;
41
41
  border-bottom: 1px solid darken(@popover-title-bg, 5%);
42
42
  border-radius: 5px 5px 0 0;
43
-
44
- &:empty {
45
- display: none;
46
- }
47
43
  }
48
44
 
49
45
  .popover-content {
@@ -80,6 +76,7 @@
80
76
  border-top-color: @popover-arrow-outer-color;
81
77
  bottom: -@popover-arrow-outer-width;
82
78
  &:after {
79
+ content: " ";
83
80
  bottom: 1px;
84
81
  margin-left: -@popover-arrow-width;
85
82
  border-bottom-width: 0;
@@ -94,6 +91,7 @@
94
91
  border-right-color: #999; // IE8 fallback
95
92
  border-right-color: @popover-arrow-outer-color;
96
93
  &:after {
94
+ content: " ";
97
95
  left: 1px;
98
96
  bottom: -@popover-arrow-width;
99
97
  border-left-width: 0;
@@ -108,6 +106,7 @@
108
106
  border-bottom-color: @popover-arrow-outer-color;
109
107
  top: -@popover-arrow-outer-width;
110
108
  &:after {
109
+ content: " ";
111
110
  top: 1px;
112
111
  margin-left: -@popover-arrow-width;
113
112
  border-top-width: 0;
@@ -123,6 +122,7 @@
123
122
  border-left-color: #999; // IE8 fallback
124
123
  border-left-color: @popover-arrow-outer-color;
125
124
  &:after {
125
+ content: " ";
126
126
  right: 1px;
127
127
  border-right-width: 0;
128
128
  border-left-color: @popover-arrow-color;
@@ -52,7 +52,7 @@
52
52
  }
53
53
 
54
54
  @page {
55
- margin: 0.5cm;
55
+ margin: 2cm .5cm;
56
56
  }
57
57
 
58
58
  p,
@@ -68,7 +68,18 @@
68
68
  }
69
69
 
70
70
  // Bootstrap components
71
- .navbar-toggle {
71
+ .navbar {
72
72
  display: none;
73
73
  }
74
+ .table td,
75
+ .table th {
76
+ background-color: #fff !important;
77
+ }
78
+ .btn > .caret,
79
+ .dropup > .btn > .caret {
80
+ border-top-color: #000 !important;
81
+ }
82
+ .label {
83
+ border: 1px solid #000;
84
+ }
74
85
  }
@@ -44,8 +44,8 @@
44
44
  // Outer container
45
45
  .progress {
46
46
  overflow: hidden;
47
- height: @line-height-base;
48
- margin-bottom: @line-height-base;
47
+ height: @line-height-computed;
48
+ margin-bottom: @line-height-computed;
49
49
  background-color: @progress-bg;
50
50
  border-radius: @border-radius-base;
51
51
  .box-shadow(inset 0 1px 2px rgba(0,0,0,.1));
@@ -56,7 +56,7 @@
56
56
  float: left;
57
57
  width: 0%;
58
58
  height: 100%;
59
- font-size: 12px;
59
+ font-size: @font-size-small;
60
60
  color: #fff;
61
61
  text-align: center;
62
62
  text-shadow: 0 -1px 0 rgba(0,0,0,.25);
@@ -5,55 +5,115 @@
5
5
 
6
6
  // IE10 Metro responsive
7
7
  // Required for Windows 8 Metro split-screen snapping with IE10
8
+ //
8
9
  // Source: http://timkadlec.com/2012/10/ie10-snap-mode-and-responsive-design/
9
10
  @-ms-viewport{
10
11
  width: device-width;
11
12
  }
12
13
 
14
+ // IE10 on Windows Phone 8
15
+ // IE10 on WP8 doesn't report CSS pixels, but actual device pixels. In
16
+ // other words, say on a Lumia, you'll get 768px as the device width,
17
+ // meaning users will see the tablet styles and not phone styles.
18
+ //
19
+ // Alternatively you can override this with JS (see source below), but
20
+ // we won't be doing that here given our limited scope.
21
+ //
22
+ // Source: http://timkadlec.com/2013/01/windows-phone-8-and-device-width/
23
+ @media screen and (max-width: 400px) {
24
+ @-ms-viewport{
25
+ width: 320px;
26
+ }
27
+ }
28
+
13
29
  // Hide from screenreaders and browsers
14
30
  // Credit: HTML5 Boilerplate
15
31
  .hidden {
16
- display: none;
17
- visibility: hidden;
32
+ display: none !important;
33
+ visibility: hidden !important;
18
34
  }
19
35
 
20
36
  // Visibility utilities
21
37
 
22
- // For desktops
23
- .visible-phone { display: none !important; }
24
- .visible-tablet { display: none !important; }
25
- .hidden-phone { }
26
- .hidden-tablet { }
27
- .hidden-desktop { display: none !important; }
28
- .visible-desktop { display: inherit !important; }
38
+ // For Phones
39
+ .visible-sm {
40
+ .responsive-visibility();
41
+ }
42
+ .visible-md {
43
+ .responsive-invisibility();
44
+ }
45
+ .visible-lg {
46
+ .responsive-invisibility();
47
+ }
48
+
49
+ .hidden-sm {
50
+ .responsive-invisibility();
51
+ }
52
+ .hidden-md {
53
+ .responsive-visibility();
54
+ }
55
+ .hidden-lg {
56
+ .responsive-visibility();
57
+ }
58
+
29
59
 
30
60
  // Tablets & small desktops only
31
- @media (min-width: 768px) and (max-width: 979px) {
32
- // Hide everything else
33
- .hidden-desktop { display: inherit !important; }
34
- .visible-desktop { display: none !important ; }
35
- // Show
36
- .visible-tablet { display: inherit !important; }
37
- // Hide
38
- .hidden-tablet { display: none !important; }
39
- }
40
-
41
- // Phones only
42
- @media (max-width: 767px) {
43
- // Hide everything else
44
- .hidden-desktop { display: inherit !important; }
45
- .visible-desktop { display: none !important; }
46
- // Show
47
- .visible-phone { display: inherit !important; } // Use inherit to restore previous behavior
48
- // Hide
49
- .hidden-phone { display: none !important; }
61
+ @media (min-width: @screen-tablet) and (max-width: @screen-tablet-max) {
62
+ .visible-sm {
63
+ .responsive-invisibility();
64
+ }
65
+ .visible-md {
66
+ .responsive-visibility();
67
+ }
68
+ .visible-lg {
69
+ .responsive-invisibility();
70
+ }
71
+
72
+ .hidden-sm {
73
+ .responsive-visibility();
74
+ }
75
+ .hidden-md {
76
+ .responsive-invisibility();
77
+ }
78
+ .hidden-lg {
79
+ .responsive-visibility();
80
+ }
81
+ }
82
+
83
+ // For desktops
84
+ @media (min-width: @screen-desktop) {
85
+ .visible-sm {
86
+ .responsive-invisibility();
87
+ }
88
+ .visible-md {
89
+ .responsive-invisibility();
90
+ }
91
+ .visible-lg {
92
+ .responsive-visibility();
93
+ }
94
+
95
+ .hidden-sm {
96
+ .responsive-visibility();
97
+ }
98
+ .hidden-md {
99
+ .responsive-visibility();
100
+ }
101
+ .hidden-lg {
102
+ .responsive-invisibility();
103
+ }
50
104
  }
51
105
 
52
106
  // Print utilities
53
- .visible-print { display: none !important; }
54
- .hidden-print { }
107
+ .visible-print {
108
+ .responsive-invisibility();
109
+ }
110
+ .hidden-print { }
55
111
 
56
112
  @media print {
57
- .visible-print { display: inherit !important; }
58
- .hidden-print { display: none !important; }
113
+ .visible-print {
114
+ .responsive-visibility();
115
+ }
116
+ .hidden-print {
117
+ .responsive-invisibility();
118
+ }
59
119
  }
@@ -16,28 +16,18 @@
16
16
 
17
17
  html {
18
18
  font-size: 62.5%;
19
- // Touch the Mobile Magic™
20
- -webkit-overflow-scrolling: touch;
21
19
  -webkit-tap-highlight-color: rgba(0,0,0,0);
22
20
  }
23
21
 
24
- // Disable iOS/WinMobile font size changes
25
- @media screen and (max-device-width: 480px) {
26
- html {
27
- -webkit-text-size-adjust: 100%;
28
- -ms-text-size-adjust: 100%;
29
- }
30
- }
31
-
32
22
  body {
33
23
  font-family: @font-family-base;
34
- font-size: 14px;
24
+ font-size: @font-size-base;
35
25
  line-height: @line-height-base;
36
26
  color: @text-color;
37
27
  background-color: @body-bg;
38
28
  }
39
29
 
40
- // Reset fonts for revelant elements
30
+ // Reset fonts for relevant elements
41
31
  input,
42
32
  button,
43
33
  select,
@@ -69,15 +59,16 @@ a:focus {
69
59
  // -------------------------
70
60
 
71
61
  img {
72
- // Responsive images (ensure images don't scale beyond their parents)
73
- max-width: 100%; // Part 1: Set a maxium relative to the parent
74
- width: auto\9; // IE8 need help adjusting responsive images
75
- height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching
76
-
77
- // Match vertical alignment with other comment elements
78
62
  vertical-align: middle;
79
63
  }
80
64
 
65
+ // Responsive images (ensure images don't scale beyond their parents)
66
+ .img-responsive {
67
+ display: inline-block;
68
+ max-width: 100%; // Part 1: Set a maximum relative to the parent
69
+ height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching
70
+ }
71
+
81
72
  // Rounded corners
82
73
  .img-rounded {
83
74
  border-radius: 6px;
@@ -6,8 +6,6 @@
6
6
  table {
7
7
  max-width: 100%;
8
8
  background-color: @table-bg;
9
- border-collapse: collapse;
10
- border-spacing: 0;
11
9
  }
12
10
  th {
13
11
  text-align: left;
@@ -19,17 +17,19 @@ th {
19
17
 
20
18
  .table {
21
19
  width: 100%;
22
- margin-bottom: @line-height-base;
20
+ margin-bottom: @line-height-computed;
23
21
  // Cells
24
- th,
25
- td {
22
+ thead > tr > th,
23
+ tbody > tr > th,
24
+ thead > tr > td,
25
+ tbody > tr > td {
26
26
  padding: 8px;
27
27
  line-height: @line-height-base;
28
28
  vertical-align: top;
29
- border-top: 1px solid @table-border;
29
+ border-top: 1px solid @table-border-color;
30
30
  }
31
31
  // Bottom align for column headings
32
- thead th {
32
+ thead > tr > th {
33
33
  vertical-align: bottom;
34
34
  }
35
35
  // Remove top border from thead by default
@@ -43,7 +43,7 @@ th {
43
43
  }
44
44
  // Account for multiple tbody instances
45
45
  tbody + tbody {
46
- border-top: 2px solid @table-border;
46
+ border-top: 2px solid @table-border-color;
47
47
  }
48
48
 
49
49
  // Nesting
@@ -58,8 +58,10 @@ th {
58
58
  // -------------------------------
59
59
 
60
60
  .table-condensed {
61
- th,
62
- td {
61
+ thead > tr > th,
62
+ tbody > tr > th,
63
+ thead > tr > td,
64
+ tbody > tr > td {
63
65
  padding: 4px 5px;
64
66
  }
65
67
  }
@@ -70,77 +72,76 @@ th {
70
72
  // ----------------
71
73
 
72
74
  .table-bordered {
73
- border: 1px solid @table-border;
75
+ border: 1px solid @table-border-color;
74
76
  border-collapse: separate; // Done so we can round those corners!
75
77
  border-left: 0;
76
78
  border-radius: @border-radius-base;
77
- th,
78
- td {
79
- border-left: 1px solid @table-border;
79
+
80
+ > thead > tr > th,
81
+ > tbody > tr > th,
82
+ > thead > tr > td,
83
+ > tbody > tr > td {
84
+ border-left: 1px solid @table-border-color;
80
85
  }
81
86
  // Prevent a double border
82
- caption + thead tr:first-child th,
83
- caption + tbody tr:first-child th,
84
- caption + tbody tr:first-child td,
85
- colgroup + thead tr:first-child th,
86
- colgroup + tbody tr:first-child th,
87
- colgroup + tbody tr:first-child td,
88
- thead:first-child tr:first-child th,
89
- tbody:first-child tr:first-child th,
90
- tbody:first-child tr:first-child td {
87
+ > caption + thead > tr:first-child th,
88
+ > caption + tbody > tr:first-child th,
89
+ > caption + tbody > tr:first-child td,
90
+ > colgroup + thead > tr:first-child th,
91
+ > colgroup + tbody > tr:first-child th,
92
+ > colgroup + tbody > tr:first-child td,
93
+ > thead:first-child > tr:first-child th,
94
+ > tbody:first-child > tr:first-child th,
95
+ > tbody:first-child > tr:first-child td {
91
96
  border-top: 0;
92
97
  }
93
- // For first th/td in the first row in the first thead or tbody
94
- thead:first-child tr:first-child > th:first-child,
95
- tbody:first-child tr:first-child > td:first-child,
96
- tbody:first-child tr:first-child > th:first-child {
97
- border-top-left-radius: @border-radius-base;
98
- }
99
- // For last th/td in the first row in the first thead or tbody
100
- thead:first-child tr:first-child > th:last-child,
101
- tbody:first-child tr:first-child > td:last-child,
102
- tbody:first-child tr:first-child > th:last-child {
103
- border-top-right-radius: @border-radius-base;
104
- }
105
- // For first th/td (can be either) in the last row in the last thead, tbody, and tfoot
106
- thead:last-child tr:last-child > th:first-child,
107
- tbody:last-child tr:last-child > td:first-child,
108
- tbody:last-child tr:last-child > th:first-child,
109
- tfoot:last-child tr:last-child > td:first-child,
110
- tfoot:last-child tr:last-child > th:first-child {
111
- border-bottom-left-radius: @border-radius-base;
112
- }
113
- // For last th/td (can be either) in the last row in the last thead, tbody, and tfoot
114
- thead:last-child tr:last-child > th:last-child,
115
- tbody:last-child tr:last-child > td:last-child,
116
- tbody:last-child tr:last-child > th:last-child,
117
- tfoot:last-child tr:last-child > td:last-child,
118
- tfoot:last-child tr:last-child > th:last-child {
119
- border-bottom-right-radius: @border-radius-base;
98
+ > thead:first-child > tr:first-child > th,
99
+ > tbody:first-child > tr:first-child > td,
100
+ > tbody:first-child > tr:first-child > th {
101
+ // For first th/td in the first row in the first thead or tbody
102
+ &:first-child{
103
+ border-top-left-radius: @border-radius-base;
104
+ }
105
+ // For last th/td in the first row in the first thead or tbody
106
+ &:last-child{
107
+ border-top-right-radius: @border-radius-base;
108
+ }
109
+ }
110
+ > thead:last-child > tr:last-child > th,
111
+ > tbody:last-child > tr:last-child > td,
112
+ > tbody:last-child > tr:last-child > th,
113
+ > tfoot:last-child > tr:last-child > td,
114
+ > tfoot:last-child > tr:last-child > th {
115
+ // For first th/td (can be either) in the last row in the last thead, tbody, and tfoot
116
+ &:first-child{
117
+ border-bottom-left-radius: @border-radius-base;
118
+ }
119
+ // For last th/td (can be either) in the last row in the last thead, tbody, and tfoot
120
+ &:last-child{
121
+ border-bottom-right-radius: @border-radius-base;
122
+ }
120
123
  }
121
124
 
122
125
  // Clear border-radius for first and last td in the last row in the last tbody for table with tfoot
123
- tfoot + tbody:last-child tr:last-child > td:first-child {
126
+ > tfoot + tbody:last-child > tr:last-child > td:first-child {
124
127
  border-bottom-left-radius: 0;
125
128
  }
126
- tfoot + tbody:last-child tr:last-child > td:last-child {
129
+ > tfoot + tbody:last-child > tr:last-child > td:last-child {
127
130
  border-bottom-right-radius: 0;
128
131
  }
129
132
 
130
133
  // Special fixes to round the left border on the first td/th
131
- caption + thead tr:first-child th:first-child,
132
- caption + tbody tr:first-child td:first-child,
133
- colgroup + thead tr:first-child th:first-child,
134
- colgroup + tbody tr:first-child td:first-child {
135
- border-top-left-radius: @border-radius-base;
136
- }
137
- caption + thead tr:first-child th:last-child,
138
- caption + tbody tr:first-child td:last-child,
139
- colgroup + thead tr:first-child th:last-child,
140
- colgroup + tbody tr:first-child td:last-child {
141
- border-top-right-radius: @border-radius-base;
134
+ > caption + thead > tr:first-child > th,
135
+ > caption + tbody > tr:first-child > td,
136
+ > colgroup + thead > tr:first-child > th,
137
+ > colgroup + tbody > tr:first-child > td {
138
+ &:first-child{
139
+ border-top-left-radius: @border-radius-base;
140
+ }
141
+ &:last-child{
142
+ border-top-right-radius: @border-radius-base;
143
+ }
142
144
  }
143
-
144
145
  }
145
146
 
146
147
 
@@ -179,16 +180,18 @@ th {
179
180
  // -----------------
180
181
 
181
182
  // Reset default table behavior
182
- table col[class*="col-span-"] {
183
+ table col[class^="col-"] {
183
184
  float: none;
184
185
  display: table-column;
185
186
  }
186
- table td[class*="col-span-"],
187
- table th[class*="col-span-"] {
187
+ table td[class^="col-"],
188
+ table th[class^="col-"] {
188
189
  float: none;
189
190
  display: table-cell;
190
191
  }
191
192
 
193
+
194
+
192
195
  // TABLE BACKGROUNDS
193
196
  // -----------------
194
197
  // Exact selectors below required to override .table-striped