Skip to content

Commit d87e8b7

Browse files
committed
client/note color picker/clear color cell: fix icon alignment
1 parent 0db08f4 commit d87e8b7

File tree

2 files changed

+30
-25
lines changed

2 files changed

+30
-25
lines changed

apps/client/src/menus/custom-items/NoteColorPicker.css

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -32,20 +32,6 @@
3232
outline-offset: 2px;
3333
}
3434

35-
.note-color-picker .color-cell-reset::before,
36-
.note-color-picker .custom-color-cell::before {
37-
position: absolute;
38-
display: flex;
39-
top: 0;
40-
left: 0;
41-
right: 0;
42-
bottom: 0;
43-
font-size: calc(var(--color-picker-cell-size) * 1.3);
44-
justify-content: center;
45-
align-items: center;
46-
font-family: boxicons;
47-
}
48-
4935
/*
5036
* RESET COLOR CELL
5137
*/
@@ -55,18 +41,37 @@
5541
--outline-color: var(--note-color-picker-clear-color-cell-selection-outline-color);
5642

5743
position: relative;
44+
display: flex;
45+
justify-content: center;
46+
align-items: center;
5847
}
5948

60-
.note-color-picker .color-cell-reset::before {
61-
content: "\ec8d";
62-
mix-blend-mode: normal;
63-
color: var(--note-color-picker-clear-color-cell-color);
49+
.note-color-picker .color-cell-reset svg {
50+
width: var(--color-picker-cell-size);
51+
height: var(--color-picker-cell-size);
52+
fill: var(--note-color-picker-clear-color-cell-color);
6453
}
6554

6655
/*
6756
* CUSTOM COLOR CELL
6857
*/
6958

59+
.note-color-picker .custom-color-cell::before {
60+
position: absolute;
61+
content: "\ed35";
62+
display: flex;
63+
top: 0;
64+
left: 0;
65+
right: 0;
66+
bottom: 0;
67+
font-size: calc(var(--color-picker-cell-size) * 1.3);
68+
justify-content: center;
69+
align-items: center;
70+
font-family: boxicons;
71+
font-size: 16px;
72+
color: var(--foreground);
73+
}
74+
7075
.note-color-picker .custom-color-cell {
7176
position: relative;
7277
display: flex;
@@ -78,10 +83,4 @@
7883
background-image: url(./custom-color.png);
7984
background-size: cover;
8085
--foreground: transparent;
81-
}
82-
83-
.note-color-picker .custom-color-cell::before {
84-
content: "\ed35";
85-
color: var(--foreground);
86-
font-size: 16px;
8786
}

apps/client/src/menus/custom-items/NoteColorPicker.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,13 @@ export default function NoteColorPicker(props: NoteColorPickerProps) {
7474
color={null}
7575
isSelected={(currentColor === null)}
7676
isDisabled={(note === null)}
77-
onSelect={onColorCellClicked} />
77+
onSelect={onColorCellClicked}>
78+
79+
{/* https://pictogrammers.com/library/mdi/icon/close/ */}
80+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
81+
<path d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z" />
82+
</svg>
83+
</ColorCell>
7884

7985

8086
{COLOR_PALETTE.map((color) => (

0 commit comments

Comments
 (0)