_TimeSlider.scss 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311
  1. @mixin timeSlider() {
  2. $widget-min-width: 375px;
  3. $primary-color: $border-color--contrast;
  4. $highlight-color: $button-color;
  5. .esri-time-slider {
  6. cursor: default;
  7. min-width: $widget-min-width;
  8. @include defaultBoxShadow();
  9. &__layout {
  10. &--wide {
  11. .esri-time-slider {
  12. &__row {
  13. display: flex;
  14. height: 88px;
  15. overflow: hidden;
  16. }
  17. &__animation {
  18. width: 64px;
  19. }
  20. &__time-extent {
  21. align-items: center;
  22. border: {
  23. left: 1px solid $border-color;
  24. right: 1px solid $border-color;
  25. }
  26. display: flex;
  27. flex-flow: column nowrap;
  28. justify-content: center;
  29. width: 110px;
  30. }
  31. &__min,
  32. &__max {
  33. width: 110px;
  34. }
  35. &__max {
  36. border: {
  37. right: 1px solid $border-color;
  38. }
  39. }
  40. &__slider {
  41. flex: auto;
  42. }
  43. &__previous,
  44. &__next {
  45. width: 42px;
  46. }
  47. }
  48. }
  49. &--compact {
  50. .esri-time-slider {
  51. &__row {
  52. display: flex;
  53. &:nth-child(1),
  54. &:nth-child(3) {
  55. padding: {
  56. bottom: $cap-spacing--half;
  57. top: $cap-spacing--half;
  58. }
  59. }
  60. &:nth-child(2) {
  61. height: 88px;
  62. overflow: hidden;
  63. }
  64. }
  65. &__animation {
  66. width: 35px;
  67. }
  68. &__time-extent {
  69. align-items: center;
  70. display: flex;
  71. flex: auto;
  72. flex-flow: row nowrap;
  73. justify-content: center;
  74. &-separator {
  75. margin: 0 15px 0 15px;
  76. }
  77. }
  78. &__slider {
  79. flex: auto;
  80. }
  81. &__min,
  82. &__max {
  83. flex: auto;
  84. margin: 0 35px 0 35px;
  85. }
  86. &__min {
  87. align-items: flex-start;
  88. }
  89. &__max {
  90. align-items: flex-end;
  91. }
  92. &__previous,
  93. &__next {
  94. width: 35px;
  95. }
  96. }
  97. }
  98. }
  99. &__mode {
  100. &--instant {
  101. .esri-slider {
  102. &__segment-0,
  103. &__segment-1 {
  104. background-color: $primary-color;
  105. }
  106. }
  107. }
  108. &--time-window {
  109. .esri-slider {
  110. &__segment-1 {
  111. background-color: $highlight-color;
  112. height: 6px;
  113. margin-top: -1px;
  114. }
  115. &__segment-0,
  116. &__segment-2 {
  117. background-color: $primary-color;
  118. }
  119. }
  120. }
  121. &--cumulative-from-start {
  122. .esri-slider {
  123. &__segment-0 {
  124. background-color: $highlight-color;
  125. height: 6px;
  126. margin-top: -1px;
  127. }
  128. &__segment-1 {
  129. background-color: $primary-color;
  130. }
  131. }
  132. }
  133. &--cumulative-from-end {
  134. .esri-slider {
  135. &__segment-0 {
  136. background-color: $primary-color;
  137. }
  138. &__segment-1 {
  139. background-color: $highlight-color;
  140. height: 6px;
  141. margin-top: -1px;
  142. }
  143. }
  144. }
  145. }
  146. &__animation {
  147. &-button {
  148. border: none;
  149. height: 100%;
  150. width: 100%;
  151. .esri-icon-play,
  152. .esri-icon-pause {
  153. font-size: 24px;
  154. }
  155. }
  156. }
  157. &__time-extent {
  158. font-size: $font-size__body;
  159. line-height: $font-size__body;
  160. &-group {
  161. display: flex;
  162. flex-flow: column nowrap;
  163. align-items: center;
  164. }
  165. &-date {
  166. font-weight: $font-weight--bold;
  167. color: $highlight-color;
  168. }
  169. &-time {
  170. color: $highlight-color;
  171. }
  172. &-separator {
  173. font-size: $font-size__h2;
  174. font-weight: $font-weight--bold;
  175. line-height: $font-size__h2;
  176. }
  177. }
  178. &__min,
  179. &__max {
  180. align-items: center;
  181. display: flex;
  182. flex-flow: column nowrap;
  183. font-size: $font-size__body;
  184. justify-content: center;
  185. line-height: $font-size__body;
  186. &-date {
  187. font-weight: $font-weight--bold;
  188. }
  189. }
  190. &__slider {
  191. background-color: $background-color--offset;
  192. padding: 0 40px 0 40px;
  193. .esri-slider {
  194. margin-top: -19px;
  195. background-color: $background-color--offset;
  196. // This is a fix specifically for IE11. Without it ticks and tick labels are severely displaced.
  197. &__content {
  198. height: 2px;
  199. }
  200. &__thumb {
  201. border-width: 3px;
  202. top: -6px;
  203. }
  204. &__tick-label {
  205. font-size: $font-size__body;
  206. margin-top: 23px;
  207. white-space: nowrap;
  208. }
  209. &__tick {
  210. background: $primary-color;
  211. width: 1px;
  212. &.minorTick {
  213. height: 4px;
  214. }
  215. &.majorTick {
  216. height: 8px;
  217. }
  218. }
  219. &__ticks {
  220. margin: 16px 0 0 0;
  221. }
  222. &__track {
  223. height: 4px;
  224. }
  225. }
  226. }
  227. &__previous,
  228. &__next {
  229. &-button {
  230. border: none;
  231. height: 100%;
  232. width: 100%;
  233. .esri-icon-reverse,
  234. .esri-icon-forward {
  235. font-size: 24px;
  236. }
  237. }
  238. }
  239. }
  240. html[dir="rtl"] .esri-time-slider {
  241. &__layout {
  242. &--wide {
  243. .esri-time-slider {
  244. &__row {
  245. flex-direction: row-reverse;
  246. }
  247. }
  248. }
  249. &--compact {
  250. .esri-time-slider {
  251. &__row {
  252. &:nth-child(3) {
  253. flex-direction: row-reverse;
  254. }
  255. }
  256. &__min {
  257. align-items: flex-end;
  258. }
  259. &__max {
  260. align-items: flex-start;
  261. }
  262. }
  263. }
  264. }
  265. }
  266. }
  267. @if $include_TimeSlider == true {
  268. @include timeSlider();
  269. }