_timeline.less 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426
  1. // /**
  2. // * Copyright © Magento, Inc. All rights reserved.
  3. // * See COPYING.txt for license details.
  4. // */
  5. //
  6. // Variables
  7. // _____________________________________________
  8. @timeline__background-color: @color-white-fog2;
  9. @timeline__border-color: @color-gray60;
  10. @timeline__margin-top: @indent__base;
  11. @timeline__scale: 1;
  12. @timeline__no-records__background-color: @color-white;
  13. @timeline-item__height: 3.6rem;
  14. @timeline-unit__width: 100%/7;
  15. @timeline-event__background-color: #ccf391;
  16. @timeline-event__border-color: #81c21d;
  17. @timeline-event__active__background-color: #bceeff;
  18. @timeline-event__active__border-color: #56c2e6;
  19. @timeline-event__active__permanent__color: @color-blue-pure;
  20. @timeline-event__no-records__background-color: transparent;
  21. @timeline-event__no-records__border-color: transparent;
  22. @timeline-event__no-records__color: @color-gray20;
  23. @timeline-action__color: #76c004;
  24. @timeline-action__active__color: #56c2e6;
  25. @timeline-summary__background-color: #86de00;
  26. @timeline-summary__active__background-color: #79dcff;
  27. @timeline-legend__color: @color-very-dark-gray;
  28. @timeline-past__boder-color: fade(@color-tomato-brick, 55);
  29. @timeline-date__background-color: @color-white;
  30. @timeline-date__color: @color-very-dark-gray-black;
  31. @timeline-date__padding: 1rem .3rem;
  32. @timeline-priority-scale__color: @color-gray80;
  33. @timeline-unit-gradient-end__color: #979999;
  34. @timeline-unit-gradient-start__color: #3e4040;
  35. //
  36. // Timeline
  37. // ---------------------------------------------
  38. .timeline {
  39. &:extend(.abs-clearer);
  40. margin-top: @timeline__margin-top;
  41. position: relative;
  42. z-index: 1;
  43. }
  44. .timeline-content {
  45. background: @timeline__background-color;
  46. border: 1px solid @timeline__border-color;
  47. margin-bottom: @indent__base;
  48. overflow-x: scroll;
  49. overflow-y: hidden;
  50. position: relative;
  51. &._from-now {
  52. padding-left: 50px;
  53. }
  54. &._no-records {
  55. background: @timeline__no-records__background-color;
  56. }
  57. }
  58. .timeline-past {
  59. background: linear-gradient(to left, fade(@color-white, .1), fade(@color-white, 50) 25%, @color-white);
  60. border-right: 2px solid @timeline-past__boder-color;
  61. height: 100%;
  62. left: 0;
  63. position: absolute;
  64. top: 0;
  65. width: 50px;
  66. z-index: 3;
  67. }
  68. .timeline-scale {
  69. float: right;
  70. width: 160px;
  71. }
  72. .timeline-legend {
  73. float: left;
  74. }
  75. .timeline-legend-item {
  76. color: @timeline-legend__color;
  77. display: inline-block;
  78. line-height: 2rem;
  79. vertical-align: middle;
  80. &:before {
  81. border: 1px solid @timeline__border-color;
  82. content: '';
  83. display: inline-block;
  84. height: 2rem;
  85. margin-right: 5px;
  86. vertical-align: middle;
  87. width: 2rem;
  88. }
  89. &._update-status-active,
  90. &._active {
  91. &:before {
  92. background: @timeline-event__active__background-color;
  93. }
  94. }
  95. &._update-status-upcoming,
  96. &._upcoming {
  97. &:before {
  98. background: @timeline-event__background-color;
  99. }
  100. }
  101. }
  102. //
  103. // Timeline items
  104. // ---------------------------------------------
  105. .timeline-items {
  106. .extend__list-reset-styles();
  107. min-height: @timeline-item__height * 7;
  108. position: relative;
  109. }
  110. .timeline-item {
  111. height: @timeline-item__height;
  112. position: relative;
  113. z-index: 2;
  114. & + .timeline-item {
  115. margin-top: -1px;
  116. }
  117. ._no-records & {
  118. margin-top: -@timeline-item__height;
  119. position: absolute;
  120. top: 50%;
  121. width: 100%;
  122. }
  123. }
  124. .timeline-event {
  125. .lib-vendor-prefix-display(flex);
  126. background: @timeline-event__background-color;
  127. border: 1px solid @timeline-event__border-color;
  128. cursor: pointer;
  129. height: @timeline-item__height;
  130. left: -1px;
  131. min-width: 5.5rem;
  132. overflow: hidden;
  133. padding: 0 @indent__s;
  134. position: absolute;
  135. right: 0;
  136. white-space: nowrap;
  137. width: auto;
  138. ._permanent._active &,
  139. ._no-records & {
  140. justify-content: center;
  141. text-align: center;
  142. }
  143. ._permanent._active & {
  144. color: @timeline-event__active__permanent__color;
  145. }
  146. .timeline-item._active & {
  147. background: @timeline-event__active__background-color;
  148. border-color: @timeline-event__active__border-color;
  149. }
  150. ._scroll-start:not(._active) & {
  151. padding-left: @indent__l;
  152. }
  153. ._scroll-end & {
  154. padding-right: @indent__l;
  155. }
  156. ._permanent & {
  157. margin-right: 23px;
  158. overflow: visible;
  159. }
  160. ._no-records & {
  161. background: @timeline-event__no-records__background-color;
  162. border-color: @timeline-event__no-records__border-color;
  163. color: @timeline-event__no-records__color;
  164. cursor: default;
  165. }
  166. }
  167. .timeline-event-title {
  168. .lib-vendor-prefix-flex-shrink(1);
  169. display: inline-block;
  170. font-weight: @font-weight__semibold;
  171. line-height: 3.4rem;
  172. max-width: 100%;
  173. min-width: 2.2rem;
  174. overflow: hidden;
  175. text-overflow: ellipsis;
  176. white-space: nowrap;
  177. ._no-records & {
  178. font-weight: @font-weight__regular;
  179. }
  180. }
  181. .timeline-event-info {
  182. display: inline-block;
  183. line-height: 3.4rem;
  184. vertical-align: top;
  185. }
  186. .timeline-event-details {
  187. display: none;
  188. }
  189. .timeline-action {
  190. bottom: 0;
  191. display: none;
  192. margin: auto;
  193. position: absolute;
  194. right: 10px;
  195. top: 0;
  196. > span {
  197. .hidden();
  198. }
  199. &:extend(.abs-action-reset all);
  200. &:active {
  201. .scale();
  202. }
  203. &:before {
  204. &:extend(.abs-icon all);
  205. .transition(color);
  206. color: @timeline-action__color;
  207. content: @icon-arrow-right__content;
  208. font-size: 1.8rem;
  209. }
  210. &:hover {
  211. cursor: pointer;
  212. text-decoration: none;
  213. }
  214. .timeline-item._active & {
  215. &:before {
  216. color: @timeline-action__active__color;
  217. }
  218. }
  219. &._tostart {
  220. left: 10px;
  221. right: auto;
  222. &:before {
  223. content: @icon-arrow-left__content;
  224. }
  225. .timeline-item._scroll-start:not(._active) & {
  226. display: block;
  227. }
  228. }
  229. &._toend {
  230. .timeline-item._scroll-end & {
  231. display: block;
  232. }
  233. .timeline-item._permanent & {
  234. display: none;
  235. }
  236. }
  237. }
  238. //
  239. // Timeline svg endings
  240. // ---------------------------------------------
  241. svg {
  242. .timeline-event & {
  243. display: none;
  244. height: 3.6rem;
  245. margin-right: -2.4rem;
  246. position: absolute;
  247. right: 0;
  248. top: -1px;
  249. width: 2.8rem;
  250. }
  251. ._permanent .timeline-event & {
  252. display: block;
  253. }
  254. }
  255. // Initial symbol styles
  256. .svg__timeline-ending {
  257. fill: inherit;
  258. stroke: inherit;
  259. }
  260. .svg__timeline-arrow {
  261. stroke: transparent;
  262. }
  263. // Context symbol use styles
  264. .timeline-ending {
  265. color: @timeline-summary__background-color;
  266. fill: @timeline-event__background-color;
  267. stroke: @timeline-event__border-color;
  268. .timeline-item._active & {
  269. color: @timeline-summary__active__background-color;
  270. fill: @timeline-event__active__background-color;
  271. stroke: @timeline-event__active__border-color;
  272. }
  273. }
  274. //
  275. // Timeline units row
  276. // ---------------------------------------------
  277. .timeline-units {
  278. .extend__list-reset-styles();
  279. font-size: 0;
  280. white-space: nowrap;
  281. }
  282. .timeline-unit {
  283. border-right: 1px solid @timeline__border-color;
  284. display: inline-block;
  285. list-style-type: none;
  286. margin: 0;
  287. padding: 0;
  288. width: @timeline-unit__width/@timeline__scale;
  289. &:last-child {
  290. border-right: 0;
  291. }
  292. &:before {
  293. background-image: repeating-linear-gradient(
  294. 180deg,
  295. transparent,
  296. transparent 5px,
  297. @timeline-unit-gradient-start__color 5px,
  298. @timeline-unit-gradient-start__color 6px,
  299. @timeline-unit-gradient-end__color 6px,
  300. @timeline-unit-gradient-end__color 7px
  301. );
  302. bottom: 0;
  303. content: '';
  304. margin-left: -1px;
  305. position: absolute;
  306. top: @font-size__tiny + 2rem + .2rem;
  307. width: 1px;
  308. z-index: 0;
  309. }
  310. &:first-child {
  311. &:before {
  312. content: none;
  313. }
  314. }
  315. ._no-records & {
  316. &:before {
  317. display: none;
  318. }
  319. }
  320. }
  321. .timeline-date {
  322. background: @timeline-date__background-color;
  323. border-bottom: 1px solid @timeline__border-color;
  324. color: @timeline-date__color;
  325. display: block;
  326. font-size: @font-size__tiny;
  327. line-height: 1;
  328. max-width: 100%;
  329. overflow: hidden;
  330. padding: @timeline-date__padding;
  331. text-align: center;
  332. text-overflow: ellipsis;
  333. }
  334. //
  335. // Priority scale
  336. // ---------------------------------------------
  337. .timeline-priority {
  338. float: left;
  339. font-size: 1.1rem;
  340. font-weight: @font-weight__semibold;
  341. margin-right: 1.8rem;
  342. margin-top: @timeline__margin-top;
  343. text-align: center;
  344. }
  345. .timeline-priority-title {
  346. font-weight: @font-weight__bold;
  347. padding: @timeline-date__padding;
  348. }
  349. .timeline-priority-scale {
  350. border-left: 7px solid transparent;
  351. border-right: 7px solid transparent;
  352. border-top: 210px solid @timeline-priority-scale__color;
  353. height: 0;
  354. margin: @indent__xs auto;
  355. width: 0;
  356. }