mirror of
https://github.com/canna71/obsidian-sheets.git
synced 2026-07-22 08:30:27 +00:00
Fixed styles
This commit is contained in:
parent
1f167d1d1d
commit
21b5f6b827
2 changed files with 30 additions and 33 deletions
|
|
@ -47,14 +47,14 @@ export function processCodeBlock(
|
|||
|
||||
// const containerHeight = Math.clamp((ctx as any).containerEl.offsetHeight, 200, 800);
|
||||
// TODO: check this actually exists
|
||||
let bgColor = "#ffffff";
|
||||
let fgColor = "#000"; //"#a0a0a0";
|
||||
const cel = document.getElementsByClassName("view-content")[0];
|
||||
if (cel) {
|
||||
const styles = getComputedStyle(cel);
|
||||
bgColor = bgColor || styles.getPropertyValue("background");
|
||||
fgColor = fgColor || styles.getPropertyValue("color");
|
||||
}
|
||||
// let bgColor = "#ffffff";
|
||||
// let fgColor = "#000"; //"#a0a0a0";
|
||||
// const cel = document.getElementsByClassName("view-content")[0];
|
||||
// if (cel) {
|
||||
// const styles = getComputedStyle(cel);
|
||||
// bgColor = bgColor || styles.getPropertyValue("background");
|
||||
// fgColor = fgColor || styles.getPropertyValue("color");
|
||||
// }
|
||||
|
||||
if ((ctx as any).spreadsheet) return;
|
||||
|
||||
|
|
@ -90,6 +90,7 @@ export function processCodeBlock(
|
|||
showToolbar: true,
|
||||
showGrid: true,
|
||||
showContextmenu: true,
|
||||
showValidation: false,
|
||||
view: {
|
||||
height: () => height,
|
||||
width: () => {
|
||||
|
|
@ -106,13 +107,13 @@ export function processCodeBlock(
|
|||
width: cellWidth,
|
||||
},
|
||||
style: {
|
||||
bgcolor: bgColor,
|
||||
// bgcolor: bgColor,
|
||||
align: "left",
|
||||
valign: "middle",
|
||||
textwrap: false,
|
||||
strike: false,
|
||||
underline: false,
|
||||
color: fgColor,
|
||||
// color: fgColor,
|
||||
font: {
|
||||
// name: font,
|
||||
size: fontSize,
|
||||
|
|
|
|||
42
styles.scss
42
styles.scss
|
|
@ -22,22 +22,27 @@
|
|||
--ss-background-secondary-alt: var(--background-secondary-alt);
|
||||
--ss-text-color: var(--text-normal);
|
||||
--ss-text-color-muted: var(--text-muted);
|
||||
}
|
||||
--ss-border-color: var(--divider-color);
|
||||
}
|
||||
|
||||
div.x-spreadsheet-sheet
|
||||
> div.x-spreadsheet-overlayer
|
||||
> div
|
||||
> div.x-spreadsheet-editor
|
||||
> div
|
||||
> textarea {
|
||||
background-color: #ffffff;
|
||||
// background-color: var(--background-primary);
|
||||
// div.x-spreadsheet-sheet
|
||||
// > div.x-spreadsheet-overlayer
|
||||
// > div
|
||||
// > div.x-spreadsheet-editor
|
||||
// > div
|
||||
// > textarea {
|
||||
// background-color: #ffffff;
|
||||
// // background-color: var(--background-primary);
|
||||
|
||||
color: #000000;
|
||||
// color: var(--text-normal);
|
||||
box-shadow: inherit;
|
||||
// color: #000000;
|
||||
// // color: var(--text-normal);
|
||||
// box-shadow: inherit;
|
||||
// }
|
||||
.x-spreadsheet-editor {
|
||||
textarea {
|
||||
border-radius: 0px;;
|
||||
}
|
||||
}
|
||||
|
||||
// .x-spreadsheet-tooltip {
|
||||
// color: var(--text-normal);
|
||||
// background: var(--background-primary);
|
||||
|
|
@ -202,17 +207,8 @@ ul.x-spreadsheet-menu {
|
|||
overflow-x: visible;
|
||||
}
|
||||
|
||||
div.x-spreadsheet-dropdown-title {
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.x-spreadsheet-form-input {
|
||||
// color: #000000;
|
||||
input {
|
||||
color: rgba(0, 0, 0, 0.65);
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.x-spreadsheet-icon-img.arrow-down {
|
||||
margin: 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue