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.

_grid.scss 24KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919
  1. @import "table";
  2. $v-grid-row-background-color: valo-table-background-color() !default;
  3. $v-grid-row-stripe-background-color: scale-color($v-grid-row-background-color, $lightness: if(color-luminance($v-grid-row-background-color) < 10, 4%, -4%)) !default;
  4. $v-grid-border-color-source: $v-grid-row-background-color !default;
  5. $v-grid-border: flatten-list(valo-border($color: $v-grid-border-color-source, $strength: 0.8)) !default;
  6. $v-grid-cell-focused-border: max(2px, first-number($v-border)) solid $v-selection-color !default;
  7. $v-grid-row-height: $v-table-row-height !default;
  8. $v-grid-row-selected-background-color: $v-selection-color !default;
  9. $v-grid-header-font-size: $v-table-header-font-size !default;
  10. $v-grid-header-background-color: $v-background-color !default;
  11. $v-grid-cell-padding-horizontal: 1.5 * $v-table-cell-padding-horizontal !default;
  12. $v-grid-animations-enabled: $v-animations-enabled !default;
  13. $v-grid-details-marker-width: first-number($v-grid-border) * 2 !default;
  14. $v-grid-details-marker-color: $v-selection-color !default;
  15. $v-grid-details-border-top: valo-border($color: $v-grid-border-color-source, $strength: 0.3) !default;
  16. $v-grid-details-border-top-stripe: valo-border($color: $v-grid-row-stripe-background-color, $strength: 0.3) !default;
  17. $v-grid-border-size: 1px !default;
  18. $v-grid-border: $v-grid-border-size solid #ddd !default;
  19. $v-grid-cell-vertical-border: $v-grid-border !default;
  20. $v-grid-cell-horizontal-border: $v-grid-cell-vertical-border !default;
  21. $v-grid-details-border-bottom: $v-grid-cell-horizontal-border !default;
  22. $v-grid-details-border-bottom-stripe: $v-grid-cell-horizontal-border !default;
  23. $v-grid-border-size: 1px !default;
  24. $v-grid-border: $v-grid-border-size solid #ddd !default;
  25. $v-grid-cell-vertical-border: $v-grid-border !default;
  26. $v-grid-cell-horizontal-border: $v-grid-cell-vertical-border !default;
  27. $v-grid-cell-focused-border: 1px solid !default;
  28. $v-grid-header-border: $v-grid-border !default;
  29. $v-grid-footer-border: $v-grid-header-border !default;
  30. $v-grid-row-height: round($v-font-size * 1.5) !default;
  31. $v-grid-row-background-color: #fff !default;
  32. $v-grid-row-stripe-background-color: darken($v-grid-row-background-color, 5%) !default;
  33. $v-grid-row-selected-background-color: darken($v-grid-row-background-color, 25%) !default;
  34. $v-grid-row-focused-background-color: null !default;
  35. $v-grid-header-row-height: null !default;
  36. $v-grid-header-font-size: $v-font-size !default;
  37. $v-grid-header-background-color: $v-grid-row-background-color !default;
  38. $v-grid-header-drag-marked-color: $v-grid-row-selected-background-color !default;
  39. $v-grid-footer-row-height: $v-grid-header-row-height !default;
  40. $v-grid-footer-font-size: $v-grid-header-font-size !default;
  41. $v-grid-footer-background-color: $v-grid-header-background-color !default;
  42. $v-grid-cell-padding-horizontal: 10px !default;
  43. $v-grid-editor-background-color: $v-grid-row-background-color !default;
  44. $v-grid-details-marker-width: 2px !default;
  45. $v-grid-details-marker-color: $v-grid-row-selected-background-color !default;
  46. $v-grid-details-border-top: $v-grid-cell-horizontal-border !default;
  47. $v-grid-details-border-top-stripe: $v-grid-cell-horizontal-border !default;
  48. $v-grid-details-border-bottom: 1px solid darken($v-grid-row-stripe-background-color, 10%) !default;
  49. $v-grid-details-border-bottom-stripe: 1px solid darken($v-grid-row-background-color, 10%) !default;
  50. @import "_escalator";
  51. @mixin base-grid($primaryStyleName: v-grid) {
  52. @include base-escalator($primaryStyleName: $primaryStyleName, $background-color: $v-grid-row-background-color);
  53. .#{$primaryStyleName} {
  54. outline: none;
  55. }
  56. .#{$primaryStyleName}-scroller-vertical,
  57. .#{$primaryStyleName}-scroller-horizontal {
  58. border: $v-grid-border;
  59. }
  60. .#{$primaryStyleName}-scroller-vertical {
  61. border-left: none;
  62. }
  63. .#{$primaryStyleName}-scroller-horizontal {
  64. border-top: none;
  65. }
  66. .#{$primaryStyleName}-tablewrapper {
  67. border: $v-grid-border;
  68. }
  69. // Column drag and drop elements
  70. .#{$primaryStyleName} .header-drag-table {
  71. border-spacing: 0;
  72. position: relative;
  73. table-layout: fixed;
  74. width: inherit; // a decent default fallback
  75. .#{$primaryStyleName}-header {
  76. position: absolute;
  77. > .#{$primaryStyleName}-cell {
  78. border: $v-grid-border;
  79. margin-top: -10px;
  80. opacity: 0.9;
  81. filter: alpha(opacity=90); // IE8
  82. z-index: 30000;
  83. }
  84. > .#{$primaryStyleName}-drop-marker {
  85. background-color: $v-grid-header-drag-marked-color;
  86. position: absolute;
  87. width: 3px;
  88. }
  89. }
  90. }
  91. // Sidebar
  92. .#{$primaryStyleName}-sidebar.v-contextmenu {
  93. @include box-shadow(none);
  94. border-radius: 0;
  95. position: absolute;
  96. top: 0;
  97. right: 0;
  98. background-color: $v-grid-header-background-color;
  99. border: $v-grid-header-border;
  100. padding: 0;
  101. z-index: 5;
  102. &.#{$primaryStyleName}-sidebar-popup {
  103. right: auto;
  104. }
  105. .#{$primaryStyleName}-sidebar-button {
  106. background: transparent;
  107. border: none;
  108. color: inherit;
  109. cursor: pointer;
  110. outline: none;
  111. padding: 0 4px;
  112. text-align: right;
  113. line-height: 1;
  114. &[disabled] {
  115. cursor: default;
  116. }
  117. &::-moz-focus-inner {
  118. border: 0;
  119. }
  120. &:after {
  121. content: "\f0c9";
  122. display: block;
  123. font-family: ThemeIcons, sans-serif;
  124. font-size: $v-grid-header-font-size;
  125. }
  126. }
  127. &.closed {
  128. border-radius: 0;
  129. }
  130. &.open {
  131. .#{$primaryStyleName}-sidebar-button {
  132. width: 100%;
  133. &:after {
  134. content: "\f0c9";
  135. font-size: $v-grid-header-font-size;
  136. line-height: 1;
  137. }
  138. }
  139. }
  140. .v-ie &.open .#{$primaryStyleName}-sidebar-button {
  141. vertical-align: middle;
  142. }
  143. .#{$primaryStyleName}-sidebar-content {
  144. padding: 4px 0;
  145. overflow-y: auto;
  146. overflow-x: hidden;
  147. .gwt-MenuBar {
  148. .gwt-MenuItem .column-hiding-toggle {
  149. text-shadow: none;
  150. }
  151. }
  152. }
  153. }
  154. // Common cell styles
  155. .#{$primaryStyleName}-cell {
  156. background-color: $v-grid-row-background-color;
  157. padding: 0 $v-grid-cell-padding-horizontal;
  158. line-height: $v-grid-row-height;
  159. text-overflow: ellipsis;
  160. > * {
  161. line-height: $v-line-height;
  162. vertical-align: middle;
  163. }
  164. // Force div elements to inline-blocks by default to enable vertical centering
  165. > div {
  166. display: inline-block;
  167. }
  168. &.frozen {
  169. @include box-shadow(1px 0 2px rgba(0,0,0,.1));
  170. border-right: $v-grid-cell-vertical-border;
  171. position:relative;
  172. z-index: 11;
  173. @if $v-grid-cell-vertical-border and $v-grid-cell-vertical-border != none {
  174. + th,
  175. + td {
  176. border-left: none;
  177. }
  178. }
  179. }
  180. // Style for ComponentRenderer wrap
  181. div.component-wrap {
  182. width: 100%;
  183. }
  184. }
  185. // Rows
  186. .#{$primaryStyleName}-row > td,
  187. .#{$primaryStyleName}-editor-cells > div {
  188. border-left: $v-grid-cell-vertical-border;
  189. border-bottom: $v-grid-cell-horizontal-border;
  190. &:first-child {
  191. border-left: none;
  192. }
  193. }
  194. .#{$primaryStyleName}-editor-cells.frozen > div {
  195. @include box-shadow(1px 0 2px rgba(0,0,0,.1));
  196. border-right: $v-grid-cell-vertical-border;
  197. border-left: none;
  198. }
  199. .#{$primaryStyleName}-row-stripe > td {
  200. background-color: $v-grid-row-stripe-background-color;
  201. }
  202. .#{$primaryStyleName}-row-selected > td {
  203. background: $v-grid-row-selected-background-color;
  204. }
  205. .#{$primaryStyleName}-row-focused > td {
  206. background-color: $v-grid-row-focused-background-color;
  207. }
  208. // Header
  209. .#{$primaryStyleName}-header {
  210. th {
  211. position: relative;
  212. background-color: $v-grid-header-background-color;
  213. font-size: $v-grid-header-font-size;
  214. font-weight: inherit;
  215. border-left: $v-grid-header-border;
  216. border-bottom: $v-grid-header-border;
  217. line-height: $v-grid-header-row-height;
  218. text-align: left;
  219. &:first-child {
  220. border-left: none;
  221. }
  222. }
  223. .sort-asc,
  224. .sort-desc {
  225. padding-right: round($v-grid-header-font-size * 1.2) + $v-grid-cell-padding-horizontal;
  226. &:after {
  227. font-family: ThemeIcons, sans-serif;
  228. content: "\f0de" " " attr(sort-order);
  229. position: absolute;
  230. right: $v-grid-cell-padding-horizontal;
  231. font-size: round($v-grid-header-font-size * 0.85);
  232. }
  233. }
  234. .sort-desc:after {
  235. content: "\f0dd" " " attr(sort-order);
  236. }
  237. }
  238. .#{$primaryStyleName}-column-resize-handle {
  239. position: absolute;
  240. width: 2 * $v-grid-cell-padding-horizontal;
  241. right: -$v-grid-cell-padding-horizontal;
  242. top: 0px;
  243. bottom: 0px;
  244. cursor: col-resize;
  245. z-index: 10;
  246. // TODO should refactor into a mixin
  247. -webkit-user-select: none;
  248. -khtml-user-select: none;
  249. -moz-user-select: none;
  250. -ms-user-select: none;
  251. user-select: none;
  252. }
  253. .#{$primaryStyleName}-column-resize-simple-indicator {
  254. position: absolute;
  255. width: 3px;
  256. top: 0px;
  257. left: $v-grid-cell-padding-horizontal;
  258. z-index: 9001;
  259. background: #fff;
  260. box-shadow: 0px 0px 5px #000;
  261. -webkit-user-select: none;
  262. -khtml-user-select: none;
  263. -moz-user-select: none;
  264. -ms-user-select: none;
  265. user-select: none;
  266. }
  267. // Footer
  268. .#{$primaryStyleName}-footer {
  269. td {
  270. background-color: $v-grid-footer-background-color;
  271. font-size: $v-grid-footer-font-size;
  272. font-weight: inherit;
  273. border-left: $v-grid-footer-border;
  274. border-top: $v-grid-footer-border;
  275. border-bottom: none;
  276. line-height: $v-grid-footer-row-height;
  277. &:first-child {
  278. border-left: none;
  279. }
  280. }
  281. }
  282. // Header and footer
  283. .#{$primaryStyleName}-header,
  284. .#{$primaryStyleName}-footer {
  285. .#{$primaryStyleName}-cell {
  286. overflow: visible;
  287. }
  288. }
  289. .#{$primaryStyleName}-column-header-content,
  290. .#{$primaryStyleName}-column-footer-content {
  291. width: 100%;
  292. overflow: hidden;
  293. text-overflow: ellipsis;
  294. // Hackish, needed to override the "v-grid-cell > *" rule above
  295. line-height: $v-grid-row-height;
  296. vertical-align: baseline;
  297. }
  298. // Decorative elements
  299. .#{$primaryStyleName}-header-deco {
  300. border-top: $v-grid-header-border;
  301. border-right: $v-grid-header-border;
  302. background-color: $v-grid-header-background-color;
  303. }
  304. .#{$primaryStyleName}-footer-deco {
  305. border-bottom: $v-grid-footer-border;
  306. border-right: $v-grid-footer-border;
  307. background-color: $v-grid-footer-background-color;
  308. }
  309. .#{$primaryStyleName}-horizontal-scrollbar-deco {
  310. background-color: $v-grid-footer-background-color;
  311. border: $v-grid-footer-border;
  312. border-top: none;
  313. }
  314. // Focused cell style (common for all cells)
  315. .#{$primaryStyleName}-cell-focused {
  316. position: relative;
  317. &:before {
  318. content: "";
  319. position: absolute;
  320. top: 0;
  321. right: 0;
  322. bottom: 0;
  323. left: 0;
  324. border: $v-grid-cell-focused-border;
  325. display: none;
  326. pointer-events: none;
  327. }
  328. }
  329. .#{$primaryStyleName}:focus .#{$primaryStyleName}-cell-focused:before {
  330. display: block;
  331. }
  332. .#{$primaryStyleName}.v-disabled:focus .#{$primaryStyleName}-cell-focused:before {
  333. // Disabled Grid should not show cell focus outline
  334. display: none;
  335. }
  336. // Editor
  337. .#{$primaryStyleName}-editor {
  338. position: absolute;
  339. z-index: 20;
  340. overflow: hidden;
  341. left: 0;
  342. right: 0;
  343. border: $v-grid-border;
  344. box-sizing: border-box;
  345. -moz-box-sizing: border-box;
  346. margin-top: nth($v-grid-border, 1) * -1;
  347. @include box-shadow(0 0 9px rgba(0,0,0,.2));
  348. // Unbuffered footer needs to be 100% width to display correctly
  349. &.unbuffered {
  350. .#{$primaryStyleName}-editor-footer {
  351. width: 100%;
  352. }
  353. }
  354. }
  355. .#{$primaryStyleName}-editor-cells {
  356. position: relative;
  357. white-space: nowrap;
  358. &.frozen {
  359. z-index: 2;
  360. }
  361. > div {
  362. display: inline-block;
  363. box-sizing: border-box;
  364. vertical-align: middle;
  365. background: $v-grid-editor-background-color;
  366. &:first-child {
  367. border-left: none;
  368. }
  369. > * {
  370. vertical-align: middle;
  371. display: inline-block;
  372. }
  373. .v-filterselect {
  374. padding-left: 0;
  375. }
  376. input[type="text"],
  377. input[type="text"].v-filterselect-input,
  378. input[type="password"] {
  379. padding-left: $v-grid-cell-padding-horizontal;
  380. }
  381. input[type="text"]:not(.v-filterselect-input),
  382. input[type="password"] {
  383. padding-right: $v-grid-cell-padding-horizontal / 2;
  384. }
  385. :not(.v-assistive-device-only-label).v-widget > input[type="checkbox"] {
  386. margin-left: $v-grid-cell-padding-horizontal;
  387. }
  388. .v-textfield,
  389. .v-datefield,
  390. .v-filterselect {
  391. min-width: 100%;
  392. max-width: 100%;
  393. min-height: 100%;
  394. max-height: 100%;
  395. }
  396. .v-select,
  397. .v-select-select {
  398. min-width: 100%;
  399. max-width: 100%;
  400. }
  401. &.not-editable.#{$primaryStyleName}-cell {
  402. float: none;
  403. }
  404. }
  405. .error::before {
  406. position: absolute;
  407. display: block;
  408. height: 0;
  409. width: 0;
  410. content: "";
  411. border-top: 5px solid red;
  412. border-right: 5px solid transparent;
  413. }
  414. .error,
  415. .error > input {
  416. background-color: #fee;
  417. }
  418. }
  419. .#{$primaryStyleName}-editor-footer {
  420. display: table;
  421. height: $v-grid-row-height;
  422. border-top: $v-grid-cell-horizontal-border;
  423. margin-top: nth($v-grid-cell-horizontal-border, 1) * -1;
  424. background: $v-grid-row-background-color;
  425. padding: 0 5px;
  426. + .#{$primaryStyleName}-editor-cells > div {
  427. border-bottom: none;
  428. border-top: $v-grid-cell-horizontal-border;
  429. }
  430. &:first-child {
  431. border-top: none;
  432. margin-top: 0;
  433. border-bottom: $v-grid-cell-horizontal-border;
  434. margin-bottom: nth($v-grid-cell-horizontal-border, 1) * -1;
  435. }
  436. }
  437. .#{$primaryStyleName}-editor-message,
  438. .#{$primaryStyleName}-editor-buttons {
  439. display: table-cell;
  440. white-space: nowrap;
  441. vertical-align: middle;
  442. }
  443. .#{$primaryStyleName}-editor-message {
  444. width: 100%;
  445. position: relative;
  446. > div {
  447. position: absolute;
  448. width: 100%;
  449. overflow: hidden;
  450. text-overflow: ellipsis;
  451. line-height: $v-grid-row-height;
  452. top: 0;
  453. }
  454. }
  455. .#{$primaryStyleName}-editor-save {
  456. margin-right: 4px;
  457. }
  458. .#{$primaryStyleName}-spacer {
  459. // using padding since left is used with some position functions in escalator
  460. padding-left: $v-grid-details-marker-width - $v-grid-border-size;
  461. }
  462. .#{$primaryStyleName}-spacer > td {
  463. display: block;
  464. padding: 0;
  465. background-color: $v-grid-row-background-color;
  466. border-top: $v-grid-details-border-top;
  467. border-bottom: $v-grid-details-border-bottom;
  468. }
  469. .#{$primaryStyleName}-spacer.stripe > td {
  470. background-color: $v-grid-row-stripe-background-color;
  471. border-top: $v-grid-details-border-top-stripe;
  472. border-bottom: $v-grid-details-border-bottom-stripe;
  473. }
  474. .#{$primaryStyleName}-spacer-deco-container {
  475. border-top: $v-grid-border-size solid transparent; // same size as table wrapper border
  476. position: relative;
  477. top: 0; // escalator will override top for scrolling and margin-top for header offset.
  478. z-index: 5;
  479. }
  480. .#{$primaryStyleName}-spacer-deco {
  481. top: 0; // this will be overridden by code, but it's a good default.
  482. left: 0;
  483. width: $v-grid-details-marker-width;
  484. background-color: $v-grid-details-marker-color;
  485. position: absolute;
  486. height: 100%; // this will be overridden by code, but it's a good default.
  487. pointer-events: none;
  488. }
  489. // Renderers
  490. .#{$primaryStyleName}-cell > .v-progressbar {
  491. width: 100%;
  492. }
  493. }
  494. $v-grid-drag-indicator-color: $v-focus-color;
  495. /**
  496. *
  497. *
  498. * @param {string} $primary-stylename (v-grid) -
  499. *
  500. * @group grid
  501. */
  502. @mixin valo-grid ($primary-stylename: v-grid) {
  503. @include base-grid($primary-stylename);
  504. .#{$primary-stylename} {
  505. @include user-select(text);
  506. background-color: $v-background-color;
  507. &.v-disabled {
  508. @include opacity($v-disabled-opacity);
  509. }
  510. }
  511. .#{$primary-stylename}-header .#{$primary-stylename}-cell {
  512. @include valo-gradient($v-grid-header-background-color);
  513. text-shadow: valo-text-shadow($font-color: valo-font-color($v-grid-header-background-color), $background-color: $v-grid-header-background-color);
  514. }
  515. .#{$primary-stylename}-header .#{$primary-stylename}-cell.dragged {
  516. @include opacity(0.5, false);
  517. @include transition (opacity .3s ease-in-out);
  518. }
  519. .#{$primary-stylename}-header .#{$primary-stylename}-cell.dragged-column-header {
  520. margin-top: round($v-grid-row-height/-2);
  521. }
  522. .#{$primary-stylename}-footer .#{$primary-stylename}-cell {
  523. @include valo-gradient($v-grid-footer-background-color);
  524. text-shadow: valo-text-shadow($font-color: valo-font-color($v-grid-footer-background-color), $background-color: $v-grid-footer-background-color);
  525. }
  526. .#{$primary-stylename}-header-deco {
  527. @include valo-gradient($v-grid-header-background-color);
  528. }
  529. .#{$primary-stylename}-footer-deco,
  530. .#{$primary-stylename}-horizontal-scrollbar-deco {
  531. @include valo-gradient($v-grid-footer-background-color);
  532. }
  533. // Selected
  534. .#{$primary-stylename}-row-selected {
  535. $grid-sel-bg: $v-grid-row-selected-background-color;
  536. > .#{$primary-stylename}-cell {
  537. @include valo-gradient($grid-sel-bg);
  538. color: valo-font-color($grid-sel-bg);
  539. text-shadow: valo-text-shadow($font-color: valo-font-color($grid-sel-bg), $background-color: $grid-sel-bg);
  540. border-color: adjust-color($grid-sel-bg, $lightness: -8%, $saturation: -8%);
  541. }
  542. > .#{$primary-stylename}-cell-focused:before {
  543. border-color: adjust-color($grid-sel-bg, $lightness: 20%);
  544. }
  545. }
  546. .#{$primary-stylename}-editor {
  547. @include valo-focus-style;
  548. border-color: $v-focus-color;
  549. }
  550. .#{$primary-stylename}-editor-footer {
  551. font-size: $v-font-size--small;
  552. padding: 0 round($v-layout-spacing-horizontal / 2);
  553. background: $v-app-background-color;
  554. @if $v-grid-animations-enabled {
  555. @include animation(valo-grid-editor-footer-animate-in 200ms 120ms backwards);
  556. }
  557. }
  558. @if $v-grid-animations-enabled {
  559. .#{$primary-stylename}-editor-footer:first-child {
  560. @include animation(valo-grid-editor-footer-animate-in-alt 200ms 120ms backwards);
  561. }
  562. }
  563. .#{$primary-stylename}-editor-cells {
  564. z-index: 1;
  565. }
  566. .#{$primary-stylename}-editor-cells > div {
  567. // Vertical centering for widgets
  568. &:before {
  569. content: "";
  570. display: inline-block;
  571. height: 100%;
  572. vertical-align: middle;
  573. }
  574. &.not-editable.#{$primary-stylename}-cell {
  575. float: none;
  576. }
  577. .error::before {
  578. border-top: round($v-unit-size / 4) solid $v-error-indicator-color;
  579. border-right: round($v-unit-size / 4) solid transparent;
  580. }
  581. .error,
  582. .error > input {
  583. // taken from @mixin valo-textfield-error-style()
  584. background-color: scale-color($v-error-indicator-color, $lightness: 98%);
  585. }
  586. .v-textfield,
  587. .v-textfield-focus,
  588. .v-datefield,
  589. .v-datefield .v-textfield-focus,
  590. .v-filterselect-input,
  591. .v-filterselect-input:focus {
  592. border: none;
  593. border-radius: 0;
  594. background: transparent;
  595. @if $v-textfield-bevel {
  596. @include box-shadow(valo-bevel-and-shadow($bevel: $v-textfield-bevel));
  597. } @else {
  598. @include box-shadow(none);
  599. }
  600. }
  601. input[type="text"].v-datefield-textfield {
  602. padding-left: $v-unit-size * 1.2;
  603. }
  604. .v-textfield-focus,
  605. .v-datefield .v-textfield-focus,
  606. .v-filterselect-input:focus {
  607. position: relative;
  608. }
  609. .v-select {
  610. padding-left: round($v-grid-cell-padding-horizontal / 2);
  611. padding-right: round($v-grid-cell-padding-horizontal / 2);
  612. }
  613. .v-checkbox.v-widget {
  614. margin: 0 round($v-grid-cell-padding-horizontal / 2) 0 $v-grid-cell-padding-horizontal;
  615. > input[type="checkbox"] {
  616. margin-left: 0;
  617. }
  618. > label {
  619. white-space: nowrap;
  620. }
  621. }
  622. }
  623. .#{$primary-stylename}-editor-message > div:before {
  624. display: inline-block;
  625. @include valo-error-indicator-style($is-pseudo-element: true);
  626. }
  627. .#{$primary-stylename}-editor-save,
  628. .#{$primary-stylename}-editor-cancel {
  629. @include valo-link-style;
  630. font-weight: $v-font-weight + 100;
  631. text-decoration: none;
  632. border: none;
  633. background: transparent;
  634. padding: round($v-layout-spacing-vertical / 2) round($v-layout-spacing-horizontal / 2);
  635. margin: 0;
  636. outline: none;
  637. }
  638. .#{$primary-stylename}-spacer {
  639. margin-top: first-number($v-grid-border) * -1;
  640. }
  641. // Sidebar
  642. .#{$primary-stylename}-sidebar.v-contextmenu {
  643. &.open {
  644. .#{$primary-stylename}-sidebar-content {
  645. margin: 0 0 2px;
  646. padding: 4px 4px 2px;
  647. overflow-y: auto;
  648. overflow-x: hidden;
  649. }
  650. }
  651. &.closed {
  652. @include valo-gradient($v-grid-header-background-color);
  653. }
  654. }
  655. // Customize scrollbars
  656. .#{$primary-stylename}-scroller {
  657. &::-webkit-scrollbar {
  658. border: none;
  659. }
  660. &::-webkit-scrollbar-thumb {
  661. border-radius: 10px;
  662. border: 4px solid transparent;
  663. background: if(is-dark-color($v-grid-header-background-color), rgba(255,255,255,.3), rgba(0,0,0,.3));
  664. -webkit-background-clip: content-box;
  665. background-clip: content-box;
  666. }
  667. }
  668. .#{$primary-stylename}-scroller-vertical::-webkit-scrollbar-thumb {
  669. min-height: 30px;
  670. }
  671. .#{$primary-stylename}-scroller-horizontal::-webkit-scrollbar-thumb {
  672. min-width: 30px;
  673. }
  674. // Drag and drop badge
  675. .#{$primary-stylename}-row-drag-badge {
  676. background-color: red;
  677. color: white;
  678. display: block;
  679. width: 30px;
  680. height: 30px;
  681. border-radius: 10px;
  682. line-height: 30px;
  683. text-align: center;
  684. float: left;
  685. }
  686. // Drag and drop
  687. .#{$primary-stylename}-row-drag-top, .#{$primary-stylename}-row-drag-bottom, .#{$primary-stylename}-row-drag-bottom {
  688. z-index: 100; // based on what else z-indexes are in grid/escalator
  689. }
  690. .#{$primary-stylename}-row-drag-top:before,
  691. .#{$primary-stylename}-row-drag-bottom:after {
  692. content: "";
  693. display: block;
  694. position: absolute;
  695. height: 2px;
  696. width: 100%;
  697. background: $v-grid-drag-indicator-color;
  698. pointer-events: none;
  699. border: none;
  700. }
  701. .#{$primary-stylename}-row-drag-bottom:after {
  702. bottom: -1px;
  703. }
  704. .#{$primary-stylename}-row-drag-top:before {
  705. top: -1px;
  706. }
  707. .#{$primary-stylename}-row-drag-top:first-child:before {
  708. top: 0;
  709. }
  710. .#{$primary-stylename}-row-drag-center:after {
  711. content: "";
  712. position: absolute;
  713. top: 0;
  714. left: 0;
  715. bottom: 0;
  716. right: 2px;
  717. border: 2px solid $v-grid-drag-indicator-color;
  718. pointer-events: none;
  719. }
  720. .#{$primary-stylename}-row-selected {
  721. &.#{$primary-stylename}-row-drag-center:after {
  722. border-color: darken($v-grid-drag-indicator-color, 10%);
  723. }
  724. &.#{$primary-stylename}-row-drag-top:before,
  725. &.#{$primary-stylename}-row-drag-bottom:after {
  726. background: darken($v-grid-drag-indicator-color, 10%);
  727. }
  728. }
  729. // Show drop hint when the grid is empty or,
  730. // if the DropMode.ON_TOP is used and dragging below last row
  731. .#{$primary-stylename}-body-drag-top:after {
  732. content: "";
  733. position: absolute;
  734. top: 0;
  735. right: 0;
  736. bottom: 0;
  737. left: 0;
  738. pointer-events: none;
  739. border: 2px solid $v-grid-drag-indicator-color;
  740. z-index: 100; // based on what else z-indexes are in grid/escalator
  741. }
  742. }
  743. @include keyframes(valo-grid-editor-footer-animate-in) {
  744. 0% {
  745. margin-top: -$v-grid-row-height;
  746. }
  747. }
  748. @include keyframes(valo-grid-editor-footer-animate-in-alt) {
  749. 0% {
  750. margin-bottom: -$v-grid-row-height - first-number($v-grid-cell-horizontal-border);
  751. }
  752. 100% {
  753. margin-bottom: first-number($v-grid-cell-horizontal-border) * -1;
  754. }
  755. }