Skip to content
This repository was archived by the owner on Jul 28, 2025. It is now read-only.

Commit bc0eb08

Browse files
committed
Merge branch '534-fr-css-tweaks-to-match-new-obsidian-theme'
2 parents 713e553 + f3b9a56 commit bc0eb08

File tree

8 files changed

+30
-15
lines changed

8 files changed

+30
-15
lines changed

src/components/AddRow.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,8 @@ export function AddRow(props: AddRowProps) {
6666
className={`${c("add-row")}`}
6767
size="small"
6868
sx={{
69-
padding: 0.5,
7069
bordercolor: StyleVariables.TEXT_NORMAL,
71-
border: 0.5,
70+
border: 0,
7271
}}
7372
>
7473
<Button
@@ -77,7 +76,6 @@ export function AddRow(props: AddRowProps) {
7776
setInputNewRow("");
7877
setShowNewRow(!showNewRow);
7978
}}
80-
size="small"
8179
sx={{
8280
bgcolor: StyleVariables.BACKGROUND_PRIMARY,
8381
color: StyleVariables.TEXT_NORMAL,
@@ -86,17 +84,17 @@ export function AddRow(props: AddRowProps) {
8684
color: StyleVariables.TEXT_NORMAL,
8785
border: 0,
8886
},
89-
height: "30px",
90-
maxHeight: "30px",
9187
border: 0,
9288
}}
89+
style={{ minWidth: "30px" }}
9390
>
9491
{showNewRow ? (
9592
<CloseIcon />
9693
) : (
9794
<AddIcon
9895
style={{
9996
border: 0,
97+
fontSize: "1.35rem",
10098
}}
10199
/>
102100
)}

src/components/NavBar.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,8 @@ export function NavBar(navBarProps: NavBarProps) {
110110
<Toolbar
111111
style={{
112112
minHeight: "2.65rem",
113+
padding: 0,
114+
paddingLeft: "2px",
113115
}}
114116
>
115117
<IconButton
@@ -123,6 +125,7 @@ export function NavBar(navBarProps: NavBarProps) {
123125
mr: 2,
124126
maxWidth: 40,
125127
marginRight: 1,
128+
padding: 0.5,
126129
}}
127130
>
128131
<MenuIcon />
@@ -136,6 +139,7 @@ export function NavBar(navBarProps: NavBarProps) {
136139
scale: 0.7,
137140
padding: 0,
138141
boxShadow: "none",
142+
backgroundColor: "transparent",
139143
}}
140144
>
141145
{/** Global filter */}

src/components/reducers/DataviewFilters.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export default function EditFiltersButton(props: DataviewFiltersProps) {
4444
size="small"
4545
onClick={openFiltersGroupHandler}
4646
key={`Button-FilterConditions-DataviewFilters`}
47-
style={{ minWidth: "0px", padding: "2px" }}
47+
style={{ minWidth: "0px", padding: "2px", borderRadius: "0px" }}
4848
>
4949
<span
5050
className="svg-icon svg-gray"

src/components/reducers/QuickFilters.tsx

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ const QuickFilters = (props: DataviewFiltersProps) => {
3434
return filters.conditions.length > 0 ? (
3535
<Stack direction="row" spacing={1} key="stack-quick-filters">
3636
{filters.conditions.map((condition, filterIndex) => {
37+
const { disabled } = condition as FilterGroupCondition;
3738
if ((condition as FilterGroupCondition).condition) {
3839
const label = (condition as FilterGroupCondition).label;
3940
return (
@@ -45,11 +46,15 @@ const QuickFilters = (props: DataviewFiltersProps) => {
4546
size="small"
4647
label={label ?? `filter-${filterIndex}`}
4748
sx={{
48-
backgroundColor: (condition as FilterGroupCondition).disabled
49-
? StyleVariables.BACKGROUND_SECONDARY
50-
: StyleVariables.BACKGROUND_MODIFIER_SUCCESS,
51-
boxShadow: `1px 1px 1px 1px ${StyleVariables.TEXT_NORMAL}`,
52-
color: StyleVariables.TEXT_NORMAL,
49+
backgroundColor: disabled
50+
? StyleVariables.INTERACTIVE_NORMAL
51+
: StyleVariables.TEXT_ACCENT,
52+
boxShadow: disabled ? StyleVariables.INPUT_SHADOW : "none",
53+
borderColor: disabled ? StyleVariables.LINK_COLOR : "none",
54+
color: disabled
55+
? StyleVariables.LINK_COLOR
56+
: StyleVariables.TEXT_NORMAL,
57+
borderRadius: "4px",
5358
}}
5459
/>
5560
</div>

src/components/reducers/ToggleFiltersButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export default function ToggleFiltersButton(props: DataviewFiltersProps) {
3030
size="small"
3131
onClick={enableFilterHandler}
3232
key={`Button-Enabled-DataviewFilters`}
33-
style={{ minWidth: "0px", padding: "2px" }}
33+
style={{ minWidth: "0px", padding: "2px", borderRadius: "0px" }}
3434
>
3535
<span className="svg-icon svg-gray">
3636
{filters.enabled ? <FilterOnIcon /> : <FilterOffIcon />}

src/components/styles/NavBarStyles.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ export const SearchIconWrapper = styled('div')(({ theme }) => ({
2121
display: 'flex',
2222
alignItems: 'center',
2323
justifyContent: 'center',
24-
textAlign: 'center'
24+
textAlign: 'center',
25+
color: StyleVariables.TEXT_NORMAL,
2526
}));
2627

2728
export const DebouncedInputWrapper = styled('div')(({ theme }) => ({
@@ -46,6 +47,8 @@ export const PaginationButtonStyle = {
4647
opacity: 0.5,
4748
cursor: "not-allowed",
4849
backgroundColor: StyleVariables.BACKGROUND_SECONDARY,
50+
boxShadow: StyleVariables.INPUT_SHADOW,
51+
color: StyleVariables.TEXT_NORMAL,
4952
},
5053
":hover": {
5154
backgroundColor: StyleVariables.TEXT_ACCENT_HOVER,

src/helpers/Constants.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,9 @@ export const StyleVariables = Object.freeze({
243243
TEXT_NORMAL: 'var(--text-normal)',
244244
TEXT_ACCENT_HOVER: 'var(--text-accent-hover)',
245245
TEXT_ACCENT: 'var(--text-accent)',
246+
LINK_COLOR: 'var(--link-color)',
247+
INTERACTIVE_NORMAL: 'var(--interactive-normal)',
248+
INPUT_SHADOW: 'var(--input-shadow)',
246249
});
247250

248251
export const SourceDataTypes = Object.freeze({

styles.css

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,15 @@ div.database-plugin__td.data-input:hover {
8585
box-shadow: 0 0 1px 2px var(--text-accent-hover);
8686
}
8787

88+
/******************************************************
89+
* Inputs of cells
90+
******************************************************/
8891
.data-input {
8992
white-space: pre-wrap;
9093
border: none;
9194
padding: 0.5rem;
9295
color: var(--text-normal);
9396
font-size: 1rem;
94-
border-radius: 4px;
9597
resize: none;
9698
box-sizing: border-box;
9799
flex: 1 1 auto;
@@ -393,7 +395,7 @@ div.database-plugin__checkbox {
393395

394396
.database-plugin__table {
395397
position: relative;
396-
border-spacing: 0;
398+
border-spacing: 2px;
397399
border-bottom: 1px solid var(--background-modifier-border);
398400
display: table;
399401
height: 1px; /** Hack to prevent collapsing of table cells */

0 commit comments

Comments
 (0)