1- @mixin toolbox-button-base {
2- background-color : $brand-gray ;
3- color : $black ;
4- padding : 0em ;
5- width : 40px ;
6- height : 40px ;
7- font-size : 1.5em ;
8- }
9-
10- @mixin toolbox-button-focus {
11- outline : none ; /* stylelint-disable-line */
12- }
13-
14- @mixin toolbox-runButton-disabled {
15- background-color : $brand-gray ;
16- color : $brand-dark-gray ;
17- }
18-
19- @mixin toolbox-runButton-hover {
20- background-color : $toolbox-btn-active ;
21- }
22-
23- #toolbox {
24- background-color : $brand-gray ;
25- border-bottom : 1px solid $brand-dark-gray ;
26- padding : 2px 3px ;
27- z-index : 0 ;
28- overflow : auto ;
1+ $category-colours : (
2+ trade-definition : #303f9f ,
3+ before-purchase : #00897b ,
4+ during-purchase : #78909c ,
5+ after-purchase : #d81b60 ,
6+ mathematical : #689f38 ,
7+ logic : #8e24aa ,
8+ text : #fb8c00 ,
9+ variables : #5d4037 ,
10+ functions : #1976d2 ,
11+ loop : #e53935 ,
12+ list : #00acc1 ,
13+ indicators : #616161 ,
14+ time : #afb42b ,
15+ tick-analysis : #2e7d32 ,
16+ candle : #5e35b1 ,
17+ miscellaneous : #ffb300 ,
18+ );
19+
20+ .toolbox {
21+ $toolbox : &;
22+ $white : #fff ;
23+ $lightgrey : #ebebeb ;
24+ $grey : #f4f4f6 ;
25+
26+ background-color : $white ;
27+ border : 1px solid $lightgrey ;
28+ border-top-right-radius : 10px ;
29+ border-bottom-right-radius : 10px ;
30+ display : flex ;
31+ flex-direction : column ;
32+ margin-top : 20px ;
33+ max-height : calc (100% - 40px ) !important ;
34+ overflow : hidden ;
35+ position : absolute ;
36+ user-select : none ;
37+ z-index : 99 !important ;
2938
30- #runButton [disabled ], #runButton [disabled ]:hover {
31- @include toolbox-runButton-disabled ;
32- }
33- .toolbox-button {
34- @include toolbox-button-base ;
35- }
36- .toolbox-button :hover {
37- @include toolbox-runButton-hover ;
38- }
39- .toolbox-button :focus {
40- @include toolbox-button-focus ;
39+ & __header {
40+ font-weight : bold ;
41+ background-color : $grey ;
4142 }
42- .box.is-dragover {
43- background-color : #808080 ;
43+ & __category-menu {
44+ display : flex ;
45+ flex-direction : column ;
46+ flex-grow : 1 ;
47+ min-height : 0 ;
48+ overflow : auto ;
4449 }
45- .toolbox-separator {
46- background-color : $brand-dark-gray ;
47- display : inline-block ;
48- height : 15px ;
49- margin : 0 5px ;
50- user-select : none ;
51- width : 2px ;
50+ & __row {
51+ cursor : pointer ;
52+ border-top : 1px solid $lightgrey ;
5253 }
53- }
54-
55- #toolbox-login {
56- margin-top : 1px ;
57- margin-right : 20px ;
58- }
59-
60- #toolbox-account {
61- display : table ;
62- height : 40px ;
63- }
64-
65- #toolbox-account-list {
66- position : relative ;
67- user-select : none ;
68- display : table-cell ;
69- vertical-align : middle ;
70- padding-right : 20px ;
71-
72- & > a {
73- color : $black ;
74-
75- & :hover , & :visited {
76- text-decoration : none ;
77- }
54+ & __header , & __label {
55+ font-size : 1em ;
56+ padding : 0.6em 1em ;
7857 }
79- }
80-
81- #toolbox-main-account {
82- display : inline ;
83- padding-inline-start : 0 ;
84-
85- & > li {
86- display : inline ;
87- margin : 0 2px ;
58+ & __title {
59+ margin-right : 0.6em ;
8860 }
89- & > li :not (:first-child ):not (:last-child ):before {
90- content : ' \2022 ' ;
91- margin-right : 7px ;
61+ & __arrow {
62+ cursor : pointer ;
63+ position : absolute ;
64+ top : 0.6em ;
65+ right : 0.6em ;
66+ transform : rotate (90deg );
67+ transition : transform 0.25s ease ;
9268 }
93- & > .nav-caret {
94- display : inline-block ;
69+ & __item {
70+ position : relative ;
9571 }
96- }
97-
98- #toolbox-all-accounts {
99- border : 0 ;
100- z-index : 100 ;
101- margin-top : -1px ;
102- background : none ;
103- right : 20px ;
104-
105- & li {
72+ & __color {
73+ position : absolute ;
74+ left : 0 ;
75+ width : 4px ;
10676 height : 100% ;
107-
108- & a {
109- margin-top : 0 ;
77+ }
78+ & --collapsed {
79+ #{$toolbox } __header , #{$toolbox } __item {
80+ padding : 0.6em ;
81+ }
82+ #{$toolbox } __color {
83+ position : relative ;
84+ width : 20px ;
85+ height : 20px ;
86+ border-radius : 50% ;
87+ }
88+ #{$toolbox } __title , #{$toolbox } __label {
89+ display : none ;
90+ }
91+ #{$toolbox } __arrow {
92+ position : relative ;
93+ transform : rotate (270deg );
94+ margin-top : -2px ;
95+ top : 0 ;
96+ right : -2px ;
97+ }
98+ #{$toolbox } __row {
99+ border-top : none ;
110100 }
111101 }
112- }
113-
114- button {
115- & > .barspinner.white {
116- position : relative ;
117- margin : 3px auto ;
118- height : 13px ;
119- top : initial ; /* stylelint-disable-line */
120- left : initial ; /* stylelint-disable-line */
102+ @each $category , $category-colour in $category-colours {
103+ & __category--#{$category} #{&} __category--selected {
104+ background-color : transparentize ($category-colour , 0.9 );
105+ }
106+ & __category--#{$category} {
107+ & :hover {
108+ background-color : transparentize ($category-colour , 0.95 );
109+ }
110+ & > #{$toolbox } __color {
111+ background-color : $category-colour ;
112+ }
113+ }
121114 }
122- }
115+ }
0 commit comments