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 23KB

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