You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

table.css 6.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290
  1. /* Table theme building instructions
  2. *
  3. * Vaadin scroll table is very complex widget with dozens of features. These
  4. * features set some limitations for theme builder. To keep things working, it
  5. * is safest to try to just override values used in default theme and comfort to
  6. * these instructions.
  7. *
  8. * Borders in table header and in table body need to be same width
  9. * - specify vertical borders on .v-table-header-wrap and .v-table-body
  10. *
  11. * Table cells in body:
  12. * - padding/border for cells is to be defined for td elements (class name: .v-table-cell-content)
  13. * - in default theme there are no borders, but they should work. Just set border-right or border-bottom
  14. * - no padding or border is allowed for div inside cells (class name: .v-table-cell-wrapper) element
  15. * - background is allowed for both elements
  16. *
  17. * Table headers:
  18. * - table cells in header contain .v-table-resizer and
  19. * .v-table-caption-container div elements, which are both floated to right
  20. * - to align header caption to body content resizer width + .v-table-caption-container
  21. * padding right should be equal to content cells padding-right and border-right.
  22. * - Possible cell border in header must be themed into column resizer.
  23. *
  24. */
  25. .v-table {
  26. overflow: hidden;
  27. text-align: left; /* Force default alignment */
  28. }
  29. .v-ie7 .v-table {
  30. overflow: visible;
  31. }
  32. .v-table-header-wrap {
  33. overflow: hidden;
  34. border: 1px solid #aaa;
  35. border-bottom: none;
  36. background: #efefef;
  37. }
  38. .v-table-header table,
  39. .v-table-table {
  40. border-spacing: 0;
  41. border-collapse: separate;
  42. margin: 0;
  43. padding: 0;
  44. border: 0;
  45. }
  46. .v-table-header td {
  47. padding: 0;
  48. }
  49. .v-table-header-cell,
  50. .v-table-header-cell-asc,
  51. .v-table-header-cell-desc {
  52. cursor: pointer;
  53. }
  54. .v-table.v-disabled .v-table-header-cell,
  55. .v-table.v-disabled .v-table-header-cell-asc,
  56. .v-table.v-disabled .v-table-header-cell-desc {
  57. cursor: default;
  58. }
  59. .v-table-footer-wrap {
  60. overflow: hidden;
  61. border: 1px solid #aaa;
  62. border-top: none;
  63. background: #efefef;
  64. }
  65. .v-table-footer table {
  66. border-spacing: 0;
  67. border-collapse: collapse;
  68. margin: 0;
  69. padding: 0;
  70. border: 0;
  71. }
  72. .v-table-footer td {
  73. padding: 0;
  74. border-right: 1px solid #aaa;
  75. }
  76. .v-table-footer-cell {
  77. cursor: pointer;
  78. }
  79. .v-table-footer-container {
  80. float:right;
  81. padding-right:6px;
  82. overflow:hidden;
  83. white-space:nowrap;
  84. }
  85. .v-table-resizer {
  86. display: block;
  87. height: 1.2em;
  88. float: right;
  89. background: #aaa;
  90. cursor: e-resize; /* Opera does not support col-resize, so use e-resize instead */
  91. cursor: col-resize;
  92. width: 1px;
  93. overflow: hidden;
  94. }
  95. .v-table.v-disabled .v-table-resizer {
  96. cursor: default;
  97. }
  98. .v-table-caption-container {
  99. overflow: hidden;
  100. white-space: nowrap;
  101. margin-left: 6px;
  102. }
  103. .v-ie7 .v-table-caption-container-align-right {
  104. margin-left: 0px;
  105. padding-left: 6px;
  106. }
  107. .v-table-caption-container-align-right {
  108. float: right;
  109. }
  110. .v-table-sort-indicator {
  111. width: 0px;
  112. height: 1.2em;
  113. float: right;
  114. }
  115. .v-table-header-cell-asc .v-table-sort-indicator,
  116. .v-table-header-cell-desc .v-table-sort-indicator {
  117. width: 16px;
  118. height: 1.2em;
  119. float: right;
  120. }
  121. .v-table-header-cell-asc .v-table-sort-indicator {
  122. background: transparent url(../common/img/sprites.png) no-repeat right 6px;
  123. }
  124. .v-table-header-cell-desc .v-table-sort-indicator {
  125. background: transparent url(../common/img/sprites.png) no-repeat right -10px;
  126. }
  127. .v-table-caption-container-align-center {
  128. text-align: center;
  129. }
  130. .v-table-caption-container-align-right {
  131. text-align: right;
  132. }
  133. .v-table-caption-container .v-icon,
  134. .v-table-header-drag .v-icon {
  135. vertical-align: middle;
  136. }
  137. .v-table-body {
  138. border: 1px solid #aaa;
  139. }
  140. .v-table-row-spacer {
  141. height: 10px;
  142. overflow: hidden; /* IE hack to allow < one line height divs */
  143. }
  144. .v-table-row,
  145. .v-table-row-odd {
  146. background: #fff;
  147. border: 0;
  148. margin: 0;
  149. padding: 0;
  150. cursor: pointer;
  151. }
  152. .v-table-generated-row {
  153. background: #efefef;
  154. }
  155. .v-table-body-noselection .v-table-row,
  156. .v-table-body-noselection .v-table-row-odd {
  157. cursor: default;
  158. }
  159. .v-table .v-selected {
  160. background: #999;
  161. color: #fff;
  162. }
  163. .v-table-cell-content {
  164. white-space: nowrap;
  165. overflow: hidden;
  166. padding: 0 6px;
  167. border-right: 1px solid #aaa;
  168. }
  169. .v-table-cell-wrapper {
  170. /* Do not specify any margins, paddings or borders here */
  171. white-space: nowrap;
  172. overflow: hidden;
  173. }
  174. .v-table-cell-wrapper-align-center {
  175. text-align: center;
  176. }
  177. .v-table-cell-wrapper-align-right {
  178. text-align: right;
  179. }
  180. .v-table-column-selector {
  181. float: right;
  182. background: transparent url(../common/img/sprites.png) no-repeat 4px -37px;
  183. margin: -1.2em 0 0 0;
  184. height: 1.2em;
  185. width: 14px;
  186. position: relative; /* hide this from IE, it works without it */
  187. cursor: pointer;
  188. }
  189. .v-table.v-disabled .v-table-column-selector {
  190. cursor: default;
  191. }
  192. .v-ie6 .v-table-column-selector,
  193. .v-ie7 .v-table-column-selector {
  194. position: static;
  195. }
  196. .v-table-focus-slot-left {
  197. border-left: 2px solid #999;
  198. float: none;
  199. margin-bottom: -1.2em;
  200. width: auto;
  201. background: transparent;
  202. border-right: 1px solid #aaa;
  203. }
  204. .v-table-focus-slot-right {
  205. border-right: 2px solid #999;
  206. margin-left: -2px;
  207. }
  208. .v-table-header-drag {
  209. position: absolute;
  210. background: #efefef;
  211. border: 1px solid #eee;
  212. opacity: 0.9;
  213. filter: alpha(opacity=90);
  214. margin-top: 20px;
  215. z-index: 30000;
  216. }
  217. .v-table-header-drag .v-icon {
  218. vertical-align: middle;
  219. }
  220. .v-table-scrollposition {
  221. width: 160px;
  222. background: #eee;
  223. border: 1px solid #aaa;
  224. }
  225. .v-table-scrollposition span {
  226. display: block;
  227. text-align: center;
  228. }
  229. .v-table-body:focus,
  230. .v-table-body-wrapper:focus {
  231. outline: none;
  232. }
  233. .v-table-body.focused {
  234. border-color: #388ddd;
  235. }
  236. .v-table-focus .v-table-cell-content {
  237. border-top: 1px dotted #0066bd;
  238. border-bottom: 1px dotted #0066bd;
  239. }
  240. .v-table-focus .v-table-cell-wrapper {
  241. margin-top: -1px;
  242. margin-bottom: -1px;
  243. }
  244. /* row in column selector */
  245. .v-on {
  246. }
  247. .v-off {
  248. color: #ddd;
  249. }
  250. /*************************************
  251. * Drag'n'drop styles
  252. *************************************/
  253. .v-table-drag .v-table-body {
  254. border-color: #1d9dff;
  255. }
  256. .v-table-row-drag-middle .v-table-cell-content {
  257. background-color: #bcdcff;
  258. }
  259. .v-table-row-drag-top .v-table-cell-content {
  260. border-top: 2px solid #1d9dff;
  261. }
  262. .v-table-row-drag-top .v-table-cell-wrapper {
  263. margin-top: -2px; /* compensate the space consumed by border hint */
  264. }
  265. .v-table-row-drag-bottom .v-table-cell-content {
  266. border-bottom: 2px solid #1d9dff;
  267. }
  268. .v-table-row-drag-bottom .v-table-cell-wrapper {
  269. margin-bottom: -2px; /* compensate the space consumed by border hint */
  270. }
  271. .v-table-row-drag-top .v-table-cell-content:first-child:before,
  272. .v-table-row-drag-bottom .v-table-cell-content:first-child:after {
  273. display: block;
  274. content: "";
  275. position: absolute;
  276. width: 6px;
  277. height: 6px;
  278. margin-top: -4px;
  279. margin-left: -6px;
  280. background: transparent url(../common/img/drag-slot-dot.png);
  281. }
  282. .v-ff .v-table-row-drag-bottom .v-table-cell-content:first-child:after,
  283. .v-ie .v-table-row-drag-bottom .v-table-cell-content:first-child:after {
  284. margin-top: -2px;
  285. }