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.

escalator.scss 3.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. @mixin base-escalator($primaryStyleName: v-escalator, $background-color: #fff) {
  2. .#{$primaryStyleName} {
  3. position: relative;
  4. }
  5. .#{$primaryStyleName}-scroller {
  6. position: absolute;
  7. z-index: 1;
  8. outline: none;
  9. @include box-sizing(border-box);
  10. }
  11. .#{$primaryStyleName}-scroller-horizontal {
  12. left: 0; // Left position adjusted to align with frozen columns
  13. right: 0;
  14. bottom: 0;
  15. overflow-y: hidden;
  16. -ms-overflow-y: hidden;
  17. }
  18. .#{$primaryStyleName}-scroller-vertical {
  19. right: 0;
  20. top: 0; // this will be overridden by code, but it's a good default behavior
  21. bottom: 0; // this will be overridden by code, but it's a good default behavior
  22. overflow-x: hidden;
  23. -ms-overflow-x: hidden;
  24. }
  25. .#{$primaryStyleName}-tablewrapper {
  26. position: absolute;
  27. overflow: hidden;
  28. @include box-sizing(border-box);
  29. z-index: 5;
  30. }
  31. .#{$primaryStyleName}-tablewrapper > table {
  32. border-spacing: 0;
  33. table-layout: fixed;
  34. width: inherit; // a decent default fallback
  35. }
  36. .#{$primaryStyleName}-header-deco,
  37. .#{$primaryStyleName}-footer-deco {
  38. position: absolute;
  39. right: 0;
  40. @include box-sizing(border-box);
  41. }
  42. .#{$primaryStyleName}-horizontal-scrollbar-deco {
  43. position: absolute;
  44. bottom: 0;
  45. left: 0;
  46. right: 0;
  47. @include box-sizing(border-box);
  48. }
  49. .#{$primaryStyleName}-header,
  50. .#{$primaryStyleName}-body,
  51. .#{$primaryStyleName}-footer {
  52. position: absolute;
  53. left: 0;
  54. width: inherit;
  55. z-index: 10;
  56. }
  57. .#{$primaryStyleName}-header,
  58. .#{$primaryStyleName}-header-deco {
  59. top: 0;
  60. }
  61. .#{$primaryStyleName}-footer,
  62. .#{$primaryStyleName}-footer-deco {
  63. bottom: 0;
  64. }
  65. .#{$primaryStyleName}-body {
  66. z-index: 0;
  67. top: 0;
  68. .#{$primaryStyleName}-row {
  69. position: absolute;
  70. top: 0;
  71. left: 0;
  72. }
  73. }
  74. .#{$primaryStyleName}-row {
  75. display: block;
  76. .v-ie8 &, .v-ie9 & {
  77. // Neither IE8 nor IE9 let table rows be longer than tbody, with only
  78. // "display: block". Moar hax.
  79. float: left;
  80. clear: left;
  81. // The inline style of margin-top from the <tbody> to offset the
  82. // header's dimension is, for some strange reason, inherited into each
  83. // contained <tr>. We need to cancel it:
  84. margin-top: 0;
  85. }
  86. > td,
  87. > th {
  88. // IE8 likes the bgcolor here instead of on the row
  89. background-color: $background-color;
  90. }
  91. }
  92. .#{$primaryStyleName}-row {
  93. width: inherit;
  94. }
  95. .#{$primaryStyleName}-cell {
  96. display: block;
  97. float: left;
  98. padding: 2px;
  99. white-space: nowrap;
  100. @include box-sizing(border-box);
  101. overflow: hidden;
  102. // Because Vaadin changes the font size after the initial render, we
  103. // need to mention the font size here explicitly, otherwise automatic
  104. // row height detection gets broken.
  105. font-size: $v-font-size;
  106. }
  107. .#{$primaryStyleName}-cell.frozen {
  108. position: relative;
  109. z-index: 1;
  110. }
  111. .#{$primaryStyleName}-spacer {
  112. position: absolute;
  113. display: block;
  114. background-color: $background-color;
  115. > td {
  116. width: 100%;
  117. height: 100%;
  118. @include box-sizing(border-box);
  119. }
  120. .v-ie8 &, .v-ie9 & {
  121. // The inline style of margin-top from the <tbody> to offset the
  122. // header's dimension is, for some strange reason, inherited into each
  123. // contained <tr>. We need to cancel it:
  124. margin-top: 0;
  125. }
  126. }
  127. }