_Sketch.scss 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277
  1. @mixin sketch() {
  2. $border: 1px solid $border-color;
  3. .esri-sketch {
  4. display: flex;
  5. flex-flow: column wrap;
  6. }
  7. .esri-sketch__menu-header {
  8. margin: $cap-spacing--half;
  9. border-bottom: $border;
  10. display: flex;
  11. align-items: center;
  12. }
  13. .esri-sketch__menu-title {
  14. flex: 1 1 auto;
  15. overflow: hidden;
  16. }
  17. .esri-sketch__panel {
  18. align-items: center;
  19. display: flex;
  20. flex-flow: row nowrap;
  21. padding: 0;
  22. }
  23. .esri-sketch__info-panel {
  24. background-color: $background-color--offset;
  25. opacity: 1;
  26. transition: opacity 250ms ease-in-out;
  27. &:empty {
  28. opacity: 0;
  29. padding: 0;
  30. visibility: hidden;
  31. }
  32. }
  33. .esri-sketch__menu-container {
  34. display: flex;
  35. flex-flow: column;
  36. flex: 1 1 auto;
  37. flex-direction: column;
  38. }
  39. .esri-sketch__menu-content {
  40. background-color: $background-color--offset;
  41. padding: 0 $side-spacing--half;
  42. justify-content: center;
  43. align-items: flex-start;
  44. flex: 1 1 auto;
  45. min-height: 6vh;
  46. display: flex;
  47. flex-direction: row;
  48. animation: esri-fade-in 250ms ease-in-out;
  49. transition: min-height 250ms ease-in-out;
  50. }
  51. .esri-sketch__menu-item-wrapper {
  52. display: flex;
  53. flex: 1 1 auto;
  54. flex-direction: column;
  55. }
  56. .esri-sketch__section {
  57. align-items: center;
  58. display: flex;
  59. flex-flow: row nowrap;
  60. padding: 0 $side-spacing--half;
  61. margin: $cap-spacing--half 0;
  62. }
  63. .esri-sketch__tool-section {
  64. border-right: $border;
  65. &:last-child {
  66. border-right: none;
  67. }
  68. }
  69. .esri-sketch__button {
  70. align-items: center;
  71. background-color: transparent;
  72. border: none;
  73. color: $interactive-font-color;
  74. display: flex;
  75. font-size: $icon-size;
  76. height: $button-height;
  77. justify-content: center;
  78. text-align: center;
  79. transition: background-color 125ms ease-in-out;
  80. width: $button-width;
  81. &:disabled {
  82. cursor: default;
  83. color: $interactive-font-color--disabled;
  84. }
  85. &:hover,
  86. &:focus {
  87. background-color: $background-color--hover;
  88. color: $interactive-font-color--hover;
  89. cursor: pointer;
  90. }
  91. &.esri-sketch__button--selected,
  92. &.esri-sketch__button--selected:hover {
  93. background: $background-color--inverse;
  94. color: $interactive-font-color--inverse;
  95. }
  96. }
  97. .esri-sketch__menu-item {
  98. @include cardBoxShadow();
  99. padding: 3px;
  100. background-color: $background-color;
  101. cursor: pointer;
  102. margin: 3px 0;
  103. border: $border;
  104. border-color: transparent;
  105. border-radius: 2px;
  106. display: flex;
  107. justify-content: space-between;
  108. transition: border-color 125ms ease-in-out;
  109. }
  110. .esri-sketch__item-action-icon {
  111. flex: 0 0 $icon-size;
  112. font-size: $icon-size;
  113. display: inline-block;
  114. width: $icon-size;
  115. height: $icon-size;
  116. margin-top: 0.1em;
  117. }
  118. .esri-sketch__item-action-image {
  119. flex: 0 0 $icon-size;
  120. width: $icon-size;
  121. height: $icon-size;
  122. font-size: $font-size;
  123. text-align: center;
  124. background-size: contain;
  125. background-repeat: no-repeat;
  126. background-position: 50% 50%;
  127. }
  128. .esri-sketch__action-toggle {
  129. align-items: flex-start;
  130. border: 1px solid transparent;
  131. cursor: pointer;
  132. display: flex;
  133. flex-flow: row-reverse;
  134. font-size: $font-size--small;
  135. justify-content: space-between;
  136. margin: 0;
  137. opacity: 1;
  138. padding: $cap-spacing--half $side-spacing;
  139. transition: opacity 250ms ease-in-out 250ms, background-color 250ms ease-in-out;
  140. width: 100%;
  141. .esri-sketch__item-action-title {
  142. margin-left: 0;
  143. }
  144. .esri-sketch__item-action-icon {
  145. background-color: $background-color--hover;
  146. border-radius: $toggle-height;
  147. box-shadow: 0 0 0 1px $interactive-font-color;
  148. flex: 0 0 $toggle-width;
  149. height: $toggle-height;
  150. overflow: hidden;
  151. padding: 0;
  152. position: relative;
  153. transition: background-color 125ms ease-in-out;
  154. width: $icon-size;
  155. &:before {
  156. // Toggle handle. Overrides any icon class
  157. background-color: $interactive-font-color;
  158. box-shadow: 0 0 0 1px $interactive-font-color--inverse;
  159. border-radius: 100%;
  160. content: "";
  161. display: block;
  162. height: $toggle-handle-size;
  163. left: 0;
  164. margin: 2px;
  165. position: absolute;
  166. top: 0;
  167. transition: background-color 125ms ease-in-out, left 125ms ease-in-out;
  168. width: $toggle-handle-size;
  169. }
  170. }
  171. &.esri-disabled-element {
  172. pointer-events: none;
  173. opacity: $opacity--disabled;
  174. }
  175. }
  176. .esri-sketch__action-toggle--on .esri-sketch__item-action-icon {
  177. // Toggle on
  178. background-color: $button-color;
  179. box-shadow: 0 0 0 1px $button-color;
  180. &:before {
  181. background-color: $interactive-font-color--inverse;
  182. left: $toggle-handle-size;
  183. }
  184. }
  185. .esri-sketch__feature-count-badge {
  186. align-items: center;
  187. background: $background-color;
  188. border-bottom: $border;
  189. border-radius: $border-radius;
  190. display: flex;
  191. font-size: $font-size--small;
  192. justify-content: center;
  193. margin: 0;
  194. padding: 0.25em 0.75em;
  195. }
  196. html[dir="rtl"] {
  197. .esri-sketch__tool-section {
  198. border-left: $border;
  199. border-right: none;
  200. &:last-child {
  201. border: none;
  202. }
  203. }
  204. .esri-expand__content {
  205. .esri-sketch--vertical {
  206. .esri-sketch__tool-section {
  207. border-left: none;
  208. border-right: none;
  209. }
  210. }
  211. }
  212. }
  213. .esri-sketch--vertical {
  214. flex-direction: row-reverse;
  215. .esri-sketch__panel {
  216. flex-flow: column;
  217. }
  218. .esri-sketch__section {
  219. flex-flow: column;
  220. padding-left: 0;
  221. padding-right: 0;
  222. margin-left: $side-spacing--half;
  223. margin-right: $side-spacing--half;
  224. }
  225. .esri-sketch__tool-section {
  226. border-right: none;
  227. border-bottom: $border;
  228. &:last-child {
  229. border-bottom: none;
  230. }
  231. }
  232. .esri-sketch__info-panel {
  233. padding-top: $cap-spacing--half;
  234. &:empty {
  235. padding: 0;
  236. }
  237. }
  238. .esri-sketch__info-section {
  239. margin-top: $cap-spacing--quarter;
  240. width: $button-width;
  241. }
  242. .esri-sketch__menu-container {
  243. min-width: 30vh;
  244. }
  245. }
  246. }
  247. @if $include_Sketch == true {
  248. @include sketch();
  249. }