Skip to content

Commit 9f30610

Browse files
committed
Clean up CSS
1 parent 3af671e commit 9f30610

16 files changed

Lines changed: 55 additions & 52 deletions

TODO

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
- Extract out context menu
2-
- Extract out cell content
3-
- Permit customisation via CSS variables
2+
- Extract out cell content

src/components/CellContent.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
right: 0;
3333
top: 0;
3434
bottom: 0;
35-
background-color: white;
35+
background-color: var(--solid-tabular-cell-color);
3636
padding: 0.25rem;
3737
outline: none;
3838
border: none;

src/components/CellContent.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export const textContent =
3232
<div
3333
onDblClick={handleDoubleClick}
3434
class="solid-tabular/text-content"
35-
style={{ color: format.color ?? 'black' }}
35+
style={{ color: format.color ?? 'inherit' }}
3636
>
3737
{format.prefix?.(props.value)}
3838
<div

src/components/Renameable.css

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@
99
text-overflow: ellipsis;
1010
white-space: pre;
1111
user-select: none;
12-
13-
&.solid-tabular\/empty {
14-
color: oklch(70.7% 0.022 261.325); /* gray-400 */
15-
}
1612
}
1713

1814
input {
@@ -32,8 +28,12 @@
3228
&[data-visible='true'] {
3329
width: auto;
3430
border-radius: 4px;
35-
background-color: white;
31+
background-color: var(--solid-tabular-cell-color);
3632
padding: 0.25rem;
3733
}
3834
}
3935
}
36+
37+
.solid-tabular\/placeholder {
38+
color: var(--solid-tabular-placeholder-color);
39+
}

src/components/Renameable.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export function Renameable(props: RenameableProps) {
8989
onDblClick={handleDblClick}
9090
ref={containerEl}
9191
>
92-
<div class={cn({ 'solid-tabular/empty': !props.value.length })} title={shownValue()}>
92+
<div class={cn({ 'solid-tabular/placeholder': !props.value.length })} title={shownValue()}>
9393
{shownValue()}
9494
</div>
9595
<input

src/components/ResizeBar.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
> div {
2020
opacity: 0;
2121
transition: opacity 0.15s;
22-
background-color: var(--solid-tabular-outline-color, black);
22+
background-color: var(--solid-tabular-accent-color);
2323
}
2424

2525
&:hover > div,

src/table/AddColumnButton.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@
88
display: flex;
99
align-items: center;
1010
justify-content: center;
11-
border: 1px solid oklch(87.2% 0.01 258.338); /* gray-300 */
11+
border: 1px solid var(--solid-tabular-border-color);
1212
border-top: none;
13-
background-color: white;
13+
background-color: var(--solid-tabular-cell-color);
1414
padding: 0.25rem 0;
1515
box-sizing: border-box;
1616

1717
&:hover {
18-
background-color: oklch(96.7% 0.003 264.542); /* gray-100 */
18+
background-color: var(--solid-tabular-cell-hover-color);
1919
}
2020
}
2121
}

src/table/AddRowButton.css

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
display: flex;
33
margin: -6px 0 6px 0;
44
cursor: pointer;
5-
border-top: 1px solid oklch(87.2% 0.01 258.338); /* gray-300 */
6-
background-color: white;
5+
border-top: 1px solid var(--solid-tabular-border-color);
6+
background-color: var(--solid-tabular-cell-color);
77
z-index: 40;
88
box-sizing: border-box;
99

1010
&:hover {
11-
background-color: oklch(96.7% 0.003 264.542); /* gray-100 */
11+
background-color: var(--solid-tabular-cell-hover-color);
1212
}
1313

1414
> :first-child {
@@ -24,7 +24,6 @@
2424
.solid-tabular\/plus-btn {
2525
padding-right: 0.5rem;
2626
text-align: right;
27-
color: oklch(70.7% 0.022 261.325); /* gray-400 */
2827
box-sizing: border-box;
2928
}
3029

src/table/Cell.css

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,6 @@
44
height: 100%;
55
align-items: center;
66
outline: none;
7-
8-
/* .null {
9-
width: 100%;
10-
text-align: center;
11-
font-style: italic;
12-
color: oklch(87.2% 0.01 258.338); /* gray-300 * /
13-
} */
147
}
158

169
.solid-tabular\/cell-input-container {

src/table/ColumnHeader.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
.solid-tabular\/column-header {
22
position: absolute;
33
top: 0;
4-
border-left: 1px solid oklch(87.2% 0.01 258.338); /* gray-300 */
5-
border-bottom: 1px solid oklch(87.2% 0.01 258.338); /* gray-300 */
6-
background-color: white;
4+
border-left: 1px solid var(--solid-tabular-border-color);
5+
border-bottom: 1px solid var(--solid-tabular-border-color);
6+
background-color: var(--solid-tabular-cell-color);
77
box-sizing: border-box;
88

99
> :first-child {

0 commit comments

Comments
 (0)