11@import ' ../base/mixins' ;
22
33$category-colours : (
4- trade-definition : #303f9f ,
5- before-purchase : #00897b ,
6- during-purchase : #78909c ,
7- after-purchase : #d81b60 ,
8- mathematical : #689f38 ,
9- logic : #8e24aa ,
10- text : #fb8c00 ,
11- variables : #5d4037 ,
12- functions : #1976d2 ,
13- loop : #e53935 ,
14- list : #00acc1 ,
15- indicators : #616161 ,
16- time : #afb42b ,
17- tick-analysis : #2e7d32 ,
18- candle : #5e35b1 ,
19- miscellaneous : #ffb300 ,
4+ trade_parameters : #30409f ,
5+ purchase_conditions : #00897b ,
6+ sell_conditions : #78909c ,
7+ trade_results : #d81a60 ,
8+ technical_analysis : #689e38 ,
9+ utility : #8e25aa ,
10+ math : #fc8b01 ,
11+ text : #5d4037 ,
12+ logic : #1876d2 ,
13+ lists : #e53836 ,
14+ custom_functions : #00acc1 ,
15+ variables : #616161 ,
16+ loops : #afb42b ,
2017);
2118
2219.toolbox {
23- $toolbox : &;
24- $white : #fff ;
25- $lightgrey : #ebebeb ;
26- $grey : #f4f4f6 ;
20+ $toolbox : &;
21+ $white : #fff ;
22+ $lightgrey : #ebebeb ;
23+ $grey : #f4f4f6 ;
24+ $category-text-spacing : 15px ;
2725
2826 background-color : $white ;
2927 border : 1px solid $lightgrey ;
@@ -36,82 +34,118 @@ $category-colours: (
3634 overflow : hidden ;
3735 position : absolute ;
3836 user-select : none ;
39- z-index : 99 !important ;
37+ z-index : 1 ;
38+ width : 250px ;
4039
4140 & __header {
41+ padding : 0.5em ;
42+ position : relative ;
4243 font-weight : bold ;
44+ font-size : 1.6em ;
4345 background-color : $grey ;
46+ text-align : center ;
47+ }
48+ & __item {
49+ display : flex ;
50+ flex-direction : row ;
51+ }
52+ & __category-arrow {
53+ display : flex ;
54+ margin : auto ;
55+
56+ & --back {
57+ margin-left : $category-text-spacing ;
58+ fill : $white ;
59+ @include vendor (transform , rotate (90deg ));
60+ }
61+ & --open {
62+ margin-right : $category-text-spacing ;
63+ @include vendor (transform , rotate (270deg ));
64+ }
65+ }
66+ & __category-colour {
67+ width : 5px ;
68+ flex-shrink : 0 ;
4469 }
70+ @each $category , $colour in $category-colours {
71+ & __category {
72+ & --#{$category} {
73+ #{$toolbox } __category-colour {
74+ background-color : $colour ;
75+ }
76+ }
77+ }
78+ & __category-return {
79+ #{$toolbox } __category {
80+ & --#{$category} {
81+ background-color : $colour ;
82+ }
83+ }
84+ }
85+ }
86+
4587 & __category-menu {
4688 display : flex ;
4789 flex-direction : column ;
4890 flex-grow : 1 ;
4991 min-height : 0 ;
5092 overflow : auto ;
5193 }
52- & __row {
53- cursor : pointer ;
54- border-top : 1px solid $lightgrey ;
55- }
56- & __header , & __label {
57- font-size : 1em ;
58- padding : 0.6em 1em ;
59- }
60- & __title {
61- margin-right : 0.6em ;
62- }
63- & __arrow {
94+ & __category-return {
6495 cursor : pointer ;
65- position : absolute ;
66- top : 0.6em ;
67- right : 0.6em ;
68- @include vendor (transform , rotate (90deg ));
69- @include vendor (transition , transform 0.25s ease );
96+ color : $white ;
97+ text-align : center ;
98+
99+ #{$toolbox } __label {
100+ margin-left : - ($category-text-spacing * 2 );
101+ }
70102 }
71- & __item {
72- position : relative ;
103+ & __category-text {
104+ align-self : center ;
105+ margin : $category-text-spacing ;
106+ width : 100% ;
73107 }
74- & __color {
75- position : absolute ;
76- left : 0 ;
77- width : 4px ;
78- height : 100% ;
108+ & __description {
109+ font-size : 1.3em ;
79110 }
80- & --collapsed {
81- #{$toolbox } __header , #{$toolbox } __item {
82- padding : 0.6em ;
83- }
84- #{$toolbox } __color {
85- position : relative ;
86- width : 20px ;
87- height : 20px ;
88- border-radius : 50% ;
89- }
90- #{$toolbox } __title , #{$toolbox } __label {
91- display : none ;
92- }
93- #{$toolbox } __arrow {
94- position : relative ;
95- @include vendor (transform , rotate (270deg ));
96- margin-top : -2px ;
97- top : 0 ;
98- right : -2px ;
99- }
100- #{$toolbox } __row {
101- border-top : none ;
111+ & __icon {
112+ display : flex ;
113+ align-self : center ;
114+ margin-right : $category-text-spacing ;
115+
116+ > svg {
117+ height : 25px ;
118+ width : 25px ;
102119 }
103120 }
104- @each $category , $category-colour in $category-colours {
105- & __category--#{$category} #{&} __category--selected {
106- background-color : transparentize ($category-colour , 0.9 );
121+ & __label {
122+ font-weight : bold ;
123+ font-size : 1.6em ;
124+ }
125+ & __row {
126+ cursor : pointer ;
127+ border-top : 1px solid $lightgrey ;
128+
129+ & :last-of-type {
130+ border-bottom : 1px solid $lightgrey ;
107131 }
108- & __category--#{$category} {
109- & :hover {
110- background-color : transparentize ($category-colour , 0.95 );
111- }
112- & > #{$toolbox } __color {
113- background-color : $category-colour ;
132+
133+ @each $category , $colour in $category-colours {
134+ #{$toolbox } __category {
135+ & --#{$category} {
136+ & :hover:not (#{$toolbox}__category--selected) {
137+ background-image : linear-gradient (to right , $white 25% , transparentize ($colour , 0.8 ) 100% );
138+ }
139+ }
140+ & --#{$category}#{$toolbox}__category--selected {
141+ background-color : transparentize ($colour , 0.9 );
142+ @include vendor (transition , background-color 0.25s ease );
143+ }
114144 }
115145 }
116146 }
147+ & __separator {
148+ padding : 20px 0 ;
149+ border-top : 1px solid $lightgrey ;
150+ }
117151}
0 commit comments