Skip to content

Commit ad4b76f

Browse files
committed
finally clean up the custom block menu
1 parent 7ebc0e1 commit ad4b76f

File tree

9 files changed

+568
-216
lines changed

9 files changed

+568
-216
lines changed

src/components/custom-procedures/custom-procedures.css

Lines changed: 86 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -20,50 +20,119 @@
2020
margin: 3px;
2121
}
2222

23+
.color-picker-area {
24+
width: 100%;
25+
padding: 8px;
26+
27+
display: flex;
28+
flex-direction: column;
29+
align-items: center;
30+
}
31+
.color-picker-area > div:nth-child(1),
32+
.color-picker-area > div:nth-child(2) {
33+
width: 100%;
34+
display: flex;
35+
flex-direction: row;
36+
justify-content: space-evenly;
37+
}
38+
/* .color-picker-area div:nth-child(1) {
39+
border-bottom: 1px solid rgba(0, 0, 0, 0.2);
40+
}
41+
[theme="dark"] .color-picker-area div:nth-child(1) {
42+
border-bottom: 1px solid rgba(255, 255, 255, 0.2);
43+
} */
44+
2345
/* Color inputs & color swatch */
2446
.body input[type="color"] {
2547
appearance: none;
2648
-moz-appearance: none;
2749
-webkit-appearance: none;
2850
background: none;
29-
border: 1px solid #333;
3051
padding: 0;
52+
border: 0 !important;
3153
cursor: pointer;
32-
border-radius: 2400px;
33-
height: 15px;
34-
}
35-
[theme="dark"] .body input[type="color"] {
36-
border: 1px solid #ddd;
3754
}
3855
::-webkit-color-swatch-wrapper {
56+
margin: 0;
3957
padding: 0;
4058
}
4159

4260
::-webkit-color-swatch {
43-
border: 0;
44-
border-radius: 2400px;
61+
margin: 0;
62+
border-radius: 100%;
63+
border: 2px solid rgba(0, 0, 0, 0.2);
64+
overflow: none;
65+
padding: 0;
66+
}
67+
::-moz-color-swatch {
68+
margin: 0;
69+
border-radius: 100%;
70+
border: 2px solid rgba(0, 0, 0, 0.2);
71+
overflow: none;
72+
padding: 0;
73+
}
74+
[theme="dark"] ::-webkit-color-swatch {
75+
border-color: white;
76+
}
77+
[theme="dark"] ::-moz-color-swatch {
78+
border-color: white;
4579
}
4680

47-
::-moz-color-swatch,
4881
::-moz-focus-inner {
82+
margin: 0;
4983
border: 0;
5084
}
5185

5286
::-moz-focus-inner {
87+
margin: 0;
5388
padding: 0;
5489
}
5590

5691
/* Preset color options */
5792
.preset-color {
58-
border: 1px solid #333;
93+
border: 2px solid rgba(0, 0, 0, 0.2);
5994
margin: 4px;
60-
margin-left: 0px;
61-
border-radius: 4px;
62-
width: 1em;
63-
height: 1em;
95+
border-radius: 100%;
96+
width: 2.5em;
97+
height: 2.5em;
6498
}
99+
/* prevent soft-looking colors */
65100
[theme="dark"] .preset-color {
66-
border: 1px solid #ddd;
101+
border-color: white;
102+
}
103+
104+
.parent-custom {
105+
margin: 4px;
106+
width: 2.5em;
107+
height: 2.5em;
108+
position: relative;
109+
}
110+
.parent-custom > .preset-color {
111+
margin: 0;
112+
width: 100%;
113+
height: 100%;
114+
}
115+
116+
.custom-plus {
117+
position: absolute;
118+
left: 4px;
119+
top: 4px;
120+
width: calc(100% - 8px);
121+
height: calc(100% - 8px);
122+
z-index: 500;
123+
pointer-events: none;
124+
}
125+
126+
.preset-color:active {
127+
transform: scale(0.7);
128+
transition-duration: 0.1s;
129+
transition-timing-function: ease-out;
130+
transition-property: transform;
131+
}
132+
.preset-color {
133+
transition-duration: 0.3s;
134+
transition-timing-function: cubic-bezier(0, 0, 0.24, 1.83);
135+
transition-property: transform;
67136
}
68137

69138
/* Blocks workspace for custom procedure declaration editor */
@@ -124,9 +193,9 @@
124193
}
125194

126195
/* "Run without screen refresh" row */
127-
.checkbox-row {
196+
/* .checkbox-row {
128197
margin-top: 1rem;
129-
}
198+
} */
130199

131200
/* Confirmation buttons at the bottom of the modal */
132201
.button-row {

0 commit comments

Comments
 (0)