backgrid.css 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  1. /*
  2. backgrid
  3. http://github.com/wyuenho/backgrid
  4. Copyright (c) 2013 Jimmy Yuen Ho Wong and contributors
  5. Licensed under the MIT license.
  6. */
  7. .backgrid-container {
  8. position: relative;
  9. display: block;
  10. width: 100%;
  11. /* height: 465px; */
  12. padding: 0;
  13. overflow: auto;
  14. border: 0;
  15. }
  16. .backgrid {
  17. width: 100%;
  18. max-width: 100%;
  19. background-color: transparent;
  20. border-collapse: collapse;
  21. -webkit-border-radius: 4px;
  22. -moz-border-radius: 4px;
  23. border-radius: 4px;
  24. }
  25. .backgrid th, .backgrid td {
  26. height: 20px;
  27. max-width: 250px;
  28. padding: 4px 5px;
  29. overflow: hidden;
  30. line-height: 20px;
  31. text-align: left;
  32. text-overflow: ellipsis;
  33. white-space: nowrap;
  34. vertical-align: middle;
  35. /* border-bottom: 1px solid #DDD; */
  36. border: 1px solid #DDD;
  37. }
  38. .backgrid th.renderable, .backgrid td.renderable {
  39. display: table-cell;
  40. }
  41. .backgrid th {
  42. font-weight: bold;
  43. text-align: left;
  44. }
  45. .backgrid th.sortable a {
  46. white-space: nowrap;
  47. cursor: pointer;
  48. text-decoration: none;
  49. }
  50. .backgrid thead th {
  51. vertical-align: bottom;
  52. background-color: #f9f9f9;
  53. }
  54. .backgrid thead th a {
  55. display: block;
  56. }
  57. .backgrid.backgrid-striped tbody tr:nth-child(even) {
  58. background-color: #f9f9f9;
  59. }
  60. .backgrid tbody tr.empty {
  61. font-style: italic;
  62. color: gray;
  63. }
  64. .backgrid tbody tr.empty td {
  65. display: table-cell;
  66. text-align: center;
  67. }
  68. .backgrid td.editor {
  69. padding: 0;
  70. }
  71. .backgrid td.editor, .backgrid tbody tr:nth-child(odd) td.editor {
  72. background-color: rgba(82, 168, 236, 0.1);
  73. outline: 1px solid rgba(82, 168, 236, 0.8);
  74. outline-offset: -1px;
  75. -webkit-box-sizing: border-box;
  76. -moz-box-sizing: border-box;
  77. box-sizing: border-box;
  78. -webkit-transition-duration: 200ms;
  79. -moz-transition-duration: 200ms;
  80. -o-transition-duration: 200ms;
  81. transition-duration: 200ms;
  82. -webkit-transition-property: width, outline, background-color;
  83. -moz-transition-property: width, outline, background-color;
  84. -o-transition-property: width, outline, background-color;
  85. transition-property: width, outline, background-color;
  86. -webkit-transition-timing-function: ease-in-out;
  87. -moz-transition-timing-function: ease-in-out;
  88. -o-transition-timing-function: ease-in-out;
  89. transition-timing-function: ease-in-out;
  90. }
  91. .backgrid td.editor input[type=text] {
  92. display: block;
  93. width: 100%;
  94. height: 100%;
  95. padding: 0 5px;
  96. margin: 0;
  97. background-color: transparent;
  98. border: 0;
  99. outline: 0;
  100. -webkit-box-shadow: none;
  101. -moz-box-shadow: none;
  102. box-shadow: none;
  103. -webkit-box-sizing: border-box;
  104. -moz-box-sizing: border-box;
  105. box-sizing: border-box;
  106. -webkit-appearance: none;
  107. -moz-appearance: none;
  108. }
  109. .backgrid td.editor input[type=text]::-ms-clear {
  110. display: none;
  111. }
  112. .backgrid td.error, .backgrid tbody tr:nth-child(odd) td.error {
  113. background-color: rgba(255, 210, 77, 0.1);
  114. outline: 1px solid #ffd24d;
  115. }
  116. .backgrid td.editor :focus, .backgrid th.editor :focus {
  117. outline: 0;
  118. }
  119. .backgrid .sort-caret {
  120. display: inline-block;
  121. width: 0;
  122. height: 0;
  123. margin-left: 0.3em;
  124. border: 0;
  125. content: "";
  126. }
  127. .backgrid .ascending .sort-caret {
  128. vertical-align: baseline;
  129. border-top: none;
  130. border-right: 4px solid transparent;
  131. border-bottom: 4px solid #000000;
  132. border-left: 4px solid transparent;
  133. }
  134. .backgrid .descending .sort-caret {
  135. vertical-align: super;
  136. border-top: 4px solid #000000;
  137. border-right: 4px solid transparent;
  138. border-bottom: none;
  139. border-left: 4px solid transparent;
  140. }
  141. .backgrid .string-cell, .backgrid .uri-cell, .backgrid .email-cell,
  142. .backgrid .string-cell.editor input[type=text], .backgrid .uri-cell.editor input[type=text],
  143. .backgrid .email-cell.editor input[type=text] {
  144. text-align: left;
  145. }
  146. .backgrid .date-cell, .backgrid .time-cell, .backgrid .datetime-cell,
  147. .backgrid .number-cell, .backgrid .integer-cell, .backgrid .percent-cell,
  148. .backgrid .date-cell.editor input[type=text], .backgrid .time-cell.editor input[type=text],
  149. .backgrid .datetime-cell.editor input[type=text], .backgrid .number-cell.editor input[type=text],
  150. .backgrid .integer-cell.editor input[type=text], .backgrid .percent-cell.editor input[type=text]
  151. {
  152. text-align: right;
  153. }
  154. .backgrid .boolean-cell, .backgrid .boolean-cell.editor input[type=checkbox]
  155. {
  156. text-align: center;
  157. }
  158. .backgrid .select-cell {
  159. text-align: center;
  160. }
  161. .backgrid .select-cell.editor {
  162. padding: 0;
  163. }
  164. .backgrid .select-cell.editor select {
  165. display: block;
  166. width: 100%;
  167. height: 28px;
  168. padding: 4px 5px;
  169. margin: 0;
  170. line-height: 28px;
  171. vertical-align: middle;
  172. background-color: white;
  173. border: 0;
  174. outline: 0;
  175. -webkit-box-shadow: none;
  176. -moz-box-shadow: none;
  177. box-shadow: none;
  178. -webkit-box-sizing: border-box;
  179. -moz-box-sizing: border-box;
  180. box-sizing: border-box;
  181. }
  182. .backgrid .select-cell.editor select[multiple] {
  183. height: auto;
  184. }
  185. .backgrid .select-cell.editor :focus {
  186. border: 0;
  187. outline: 0;
  188. }
  189. .backgrid .select-cell.editor select::-moz-focus-inner, .backgrid .select-cell.editor optgroup::-moz-focus-inner,
  190. .backgrid .select-cell.editor option::-moz-focus-inner, .backgrid .select-cell.editor select::-o-focus-inner,
  191. .backgrid .select-cell.editor optgroup::-o-focus-inner, .backgrid .select-cell.editor option::-o-focus-inner
  192. {
  193. border: 0;
  194. }