123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277 |
- @mixin sketch() {
- $border: 1px solid $border-color;
- .esri-sketch {
- display: flex;
- flex-flow: column wrap;
- }
- .esri-sketch__menu-header {
- margin: $cap-spacing--half;
- border-bottom: $border;
- display: flex;
- align-items: center;
- }
- .esri-sketch__menu-title {
- flex: 1 1 auto;
- overflow: hidden;
- }
- .esri-sketch__panel {
- align-items: center;
- display: flex;
- flex-flow: row nowrap;
- padding: 0;
- }
- .esri-sketch__info-panel {
- background-color: $background-color--offset;
- opacity: 1;
- transition: opacity 250ms ease-in-out;
- &:empty {
- opacity: 0;
- padding: 0;
- visibility: hidden;
- }
- }
- .esri-sketch__menu-container {
- display: flex;
- flex-flow: column;
- flex: 1 1 auto;
- flex-direction: column;
- }
- .esri-sketch__menu-content {
- background-color: $background-color--offset;
- padding: 0 $side-spacing--half;
- justify-content: center;
- align-items: flex-start;
- flex: 1 1 auto;
- min-height: 6vh;
- display: flex;
- flex-direction: row;
- animation: esri-fade-in 250ms ease-in-out;
- transition: min-height 250ms ease-in-out;
- }
- .esri-sketch__menu-item-wrapper {
- display: flex;
- flex: 1 1 auto;
- flex-direction: column;
- }
- .esri-sketch__section {
- align-items: center;
- display: flex;
- flex-flow: row nowrap;
- padding: 0 $side-spacing--half;
- margin: $cap-spacing--half 0;
- }
- .esri-sketch__tool-section {
- border-right: $border;
- &:last-child {
- border-right: none;
- }
- }
- .esri-sketch__button {
- align-items: center;
- background-color: transparent;
- border: none;
- color: $interactive-font-color;
- display: flex;
- font-size: $icon-size;
- height: $button-height;
- justify-content: center;
- text-align: center;
- transition: background-color 125ms ease-in-out;
- width: $button-width;
- &:disabled {
- cursor: default;
- color: $interactive-font-color--disabled;
- }
- &:hover,
- &:focus {
- background-color: $background-color--hover;
- color: $interactive-font-color--hover;
- cursor: pointer;
- }
- &.esri-sketch__button--selected,
- &.esri-sketch__button--selected:hover {
- background: $background-color--inverse;
- color: $interactive-font-color--inverse;
- }
- }
- .esri-sketch__menu-item {
- @include cardBoxShadow();
- padding: 3px;
- background-color: $background-color;
- cursor: pointer;
- margin: 3px 0;
- border: $border;
- border-color: transparent;
- border-radius: 2px;
- display: flex;
- justify-content: space-between;
- transition: border-color 125ms ease-in-out;
- }
- .esri-sketch__item-action-icon {
- flex: 0 0 $icon-size;
- font-size: $icon-size;
- display: inline-block;
- width: $icon-size;
- height: $icon-size;
- margin-top: 0.1em;
- }
- .esri-sketch__item-action-image {
- flex: 0 0 $icon-size;
- width: $icon-size;
- height: $icon-size;
- font-size: $font-size;
- text-align: center;
- background-size: contain;
- background-repeat: no-repeat;
- background-position: 50% 50%;
- }
- .esri-sketch__action-toggle {
- align-items: flex-start;
- border: 1px solid transparent;
- cursor: pointer;
- display: flex;
- flex-flow: row-reverse;
- font-size: $font-size--small;
- justify-content: space-between;
- margin: 0;
- opacity: 1;
- padding: $cap-spacing--half $side-spacing;
- transition: opacity 250ms ease-in-out 250ms, background-color 250ms ease-in-out;
- width: 100%;
- .esri-sketch__item-action-title {
- margin-left: 0;
- }
- .esri-sketch__item-action-icon {
- background-color: $background-color--hover;
- border-radius: $toggle-height;
- box-shadow: 0 0 0 1px $interactive-font-color;
- flex: 0 0 $toggle-width;
- height: $toggle-height;
- overflow: hidden;
- padding: 0;
- position: relative;
- transition: background-color 125ms ease-in-out;
- width: $icon-size;
- &:before {
- // Toggle handle. Overrides any icon class
- background-color: $interactive-font-color;
- box-shadow: 0 0 0 1px $interactive-font-color--inverse;
- border-radius: 100%;
- content: "";
- display: block;
- height: $toggle-handle-size;
- left: 0;
- margin: 2px;
- position: absolute;
- top: 0;
- transition: background-color 125ms ease-in-out, left 125ms ease-in-out;
- width: $toggle-handle-size;
- }
- }
- &.esri-disabled-element {
- pointer-events: none;
- opacity: $opacity--disabled;
- }
- }
- .esri-sketch__action-toggle--on .esri-sketch__item-action-icon {
- // Toggle on
- background-color: $button-color;
- box-shadow: 0 0 0 1px $button-color;
- &:before {
- background-color: $interactive-font-color--inverse;
- left: $toggle-handle-size;
- }
- }
- .esri-sketch__feature-count-badge {
- align-items: center;
- background: $background-color;
- border-bottom: $border;
- border-radius: $border-radius;
- display: flex;
- font-size: $font-size--small;
- justify-content: center;
- margin: 0;
- padding: 0.25em 0.75em;
- }
- html[dir="rtl"] {
- .esri-sketch__tool-section {
- border-left: $border;
- border-right: none;
- &:last-child {
- border: none;
- }
- }
- .esri-expand__content {
- .esri-sketch--vertical {
- .esri-sketch__tool-section {
- border-left: none;
- border-right: none;
- }
- }
- }
- }
- .esri-sketch--vertical {
- flex-direction: row-reverse;
- .esri-sketch__panel {
- flex-flow: column;
- }
- .esri-sketch__section {
- flex-flow: column;
- padding-left: 0;
- padding-right: 0;
- margin-left: $side-spacing--half;
- margin-right: $side-spacing--half;
- }
- .esri-sketch__tool-section {
- border-right: none;
- border-bottom: $border;
- &:last-child {
- border-bottom: none;
- }
- }
- .esri-sketch__info-panel {
- padding-top: $cap-spacing--half;
- &:empty {
- padding: 0;
- }
- }
- .esri-sketch__info-section {
- margin-top: $cap-spacing--quarter;
- width: $button-width;
- }
- .esri-sketch__menu-container {
- min-width: 30vh;
- }
- }
- }
- @if $include_Sketch == true {
- @include sketch();
- }
|