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

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