Fix cell colours with multiple users
This commit is contained in:
parent
e2a860ea4c
commit
913188052a
|
@ -15,7 +15,7 @@
|
||||||
const getStyle = (width, selectedUser) => {
|
const getStyle = (width, selectedUser) => {
|
||||||
let style = `flex: 0 0 ${width}px;`
|
let style = `flex: 0 0 ${width}px;`
|
||||||
if (selectedUser) {
|
if (selectedUser) {
|
||||||
style += `--cell-color:${selectedUser.color};`
|
style += `--user-color:${selectedUser.color};`
|
||||||
}
|
}
|
||||||
return style
|
return style
|
||||||
}
|
}
|
||||||
|
@ -112,14 +112,8 @@
|
||||||
.cell.focused {
|
.cell.focused {
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
}
|
}
|
||||||
.cell.focused {
|
.cell.selected-other:hover {
|
||||||
--cell-color: var(--spectrum-global-color-blue-400) !important;
|
z-index: 2;
|
||||||
}
|
|
||||||
.cell.error {
|
|
||||||
--cell-color: var(--spectrum-global-color-red-500) !important;
|
|
||||||
}
|
|
||||||
.cell.readonly {
|
|
||||||
--cell-color: var(--spectrum-global-color-gray-600);
|
|
||||||
}
|
}
|
||||||
.cell:not(.focused) {
|
.cell:not(.focused) {
|
||||||
user-select: none;
|
user-select: none;
|
||||||
|
@ -127,6 +121,21 @@
|
||||||
.cell:hover {
|
.cell:hover {
|
||||||
cursor: default;
|
cursor: default;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Cell color overrides */
|
||||||
|
.cell.selected-other {
|
||||||
|
--cell-color: var(--user-color);
|
||||||
|
}
|
||||||
|
.cell.focused {
|
||||||
|
--cell-color: var(--spectrum-global-color-blue-400);
|
||||||
|
}
|
||||||
|
.cell.error {
|
||||||
|
--cell-color: var(--spectrum-global-color-red-500);
|
||||||
|
}
|
||||||
|
.cell.focused.readonly {
|
||||||
|
--cell-color: var(--spectrum-global-color-gray-600);
|
||||||
|
}
|
||||||
|
|
||||||
.cell.highlighted:not(.focused),
|
.cell.highlighted:not(.focused),
|
||||||
.cell.focused.readonly {
|
.cell.focused.readonly {
|
||||||
--cell-background: var(--cell-background-hover);
|
--cell-background: var(--cell-background-hover);
|
||||||
|
|
Loading…
Reference in New Issue