mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-19 16:10:12 +01:00
This commit is contained in:
parent
cf4e9f22ac
commit
b0691a41e8
7 changed files with 22 additions and 27 deletions
|
|
@ -207,11 +207,14 @@
|
||||||
/* 表格 */
|
/* 表格 */
|
||||||
--b3-table-even-background: rgba(0, 0, 0, .02);
|
--b3-table-even-background: rgba(0, 0, 0, .02);
|
||||||
|
|
||||||
/* 潜入块 */
|
/* 嵌入块 */
|
||||||
--b3-embed-background: var(--b3-table-even-background);
|
--b3-embed-background: transparent;
|
||||||
|
|
||||||
/* 引述块 */
|
/* 引述块 */
|
||||||
--b3-bq-background: var(--b3-table-even-background);
|
--b3-bq-background: transparent;
|
||||||
|
|
||||||
|
/* 父块颜色 */
|
||||||
|
--b3-parent-background: var(--b3-theme-background);
|
||||||
}
|
}
|
||||||
|
|
||||||
:lang(ja_JP):root {
|
:lang(ja_JP):root {
|
||||||
|
|
|
||||||
|
|
@ -206,11 +206,14 @@
|
||||||
/* 表格 */
|
/* 表格 */
|
||||||
--b3-table-even-background: rgba(255, 255, 255, .03);
|
--b3-table-even-background: rgba(255, 255, 255, .03);
|
||||||
|
|
||||||
/* 潜入块 */
|
/* 嵌入块 */
|
||||||
--b3-embed-background: var(--b3-table-even-background);
|
--b3-embed-background: transparent;
|
||||||
|
|
||||||
/* 引述块 */
|
/* 引述块 */
|
||||||
--b3-bq-background: var(--b3-table-even-background);
|
--b3-bq-background: transparent;
|
||||||
|
|
||||||
|
/* 父块颜色 */
|
||||||
|
--b3-parent-background: var(--b3-theme-background);
|
||||||
}
|
}
|
||||||
|
|
||||||
:lang(ja_JP):root {
|
:lang(ja_JP):root {
|
||||||
|
|
|
||||||
|
|
@ -99,7 +99,7 @@
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
height: 26px;
|
height: 26px;
|
||||||
padding: 0 5px;
|
padding: 0 5px;
|
||||||
background-color: var(--av-background);
|
background-color: var(--b3-parent-background);
|
||||||
font-size: 87.5%;
|
font-size: 87.5%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -162,7 +162,7 @@
|
||||||
|
|
||||||
&--header,
|
&--header,
|
||||||
&--footer {
|
&--footer {
|
||||||
background-color: var(--av-background);
|
background-color: var(--b3-parent-background);
|
||||||
}
|
}
|
||||||
|
|
||||||
&--footer {
|
&--footer {
|
||||||
|
|
@ -178,7 +178,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.av__colsticky {
|
.av__colsticky {
|
||||||
background-color: var(--av-background); // 保证盯住时无计算结果的列不被覆盖
|
background-color: var(--b3-parent-background); // 保证盯住时无计算结果的列不被覆盖
|
||||||
}
|
}
|
||||||
|
|
||||||
.av__calc {
|
.av__calc {
|
||||||
|
|
@ -437,7 +437,7 @@
|
||||||
|
|
||||||
&.av__firstcol,
|
&.av__firstcol,
|
||||||
& > div:not(.av__cell--select):not(.av__cell--active):not(.av__calc--ashow) {
|
& > div:not(.av__cell--select):not(.av__cell--active):not(.av__calc--ashow) {
|
||||||
background-color: var(--av-background);
|
background-color: var(--b3-parent-background);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -441,5 +441,6 @@ table[contenteditable="true"] + .protyle-action__table {
|
||||||
background: var(--b3-theme-primary-lightest);
|
background: var(--b3-theme-primary-lightest);
|
||||||
position: relative;
|
position: relative;
|
||||||
transition: var(--b3-transition);
|
transition: var(--b3-transition);
|
||||||
|
z-index: 3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -322,7 +322,7 @@
|
||||||
top: 1px;
|
top: 1px;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
box-shadow: 0 -1px 0 var(--b3-border-color) inset, 0 -1px 0 0 var(--b3-border-color);
|
box-shadow: 0 -1px 0 var(--b3-border-color) inset, 0 -1px 0 0 var(--b3-border-color);
|
||||||
background-color: var(--b3-theme-background);
|
background-color: var(--b3-parent-background);
|
||||||
|
|
||||||
th {
|
th {
|
||||||
border-top: 0;
|
border-top: 0;
|
||||||
|
|
|
||||||
|
|
@ -207,13 +207,7 @@ ${cell.color ? `color:${cell.color};` : ""}">${renderCell(cell.value, rowIndex)}
|
||||||
viewData = item;
|
viewData = item;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
let avBackground = "--av-background:var(--b3-theme-background)";
|
e.firstElementChild.outerHTML = `<div class="av__container">
|
||||||
if (e.style.backgroundColor) {
|
|
||||||
avBackground = "--av-background:" + e.style.backgroundColor;
|
|
||||||
} else if (isInEmbedBlock(e)) {
|
|
||||||
avBackground = "--av-background:var(--b3-theme-surface)";
|
|
||||||
}
|
|
||||||
e.firstElementChild.outerHTML = `<div class="av__container" style="${avBackground}">
|
|
||||||
<div class="av__header">
|
<div class="av__header">
|
||||||
<div class="fn__flex av__views${isSearching || query ? " av__views--show" : ""}">
|
<div class="fn__flex av__views${isSearching || query ? " av__views--show" : ""}">
|
||||||
<div class="layout-tab-bar fn__flex">
|
<div class="layout-tab-bar fn__flex">
|
||||||
|
|
|
||||||
|
|
@ -223,16 +223,12 @@ export const fontEvent = (protyle: IProtyle, nodeElements: Element[], type?: str
|
||||||
e.style.textShadow = "";
|
e.style.textShadow = "";
|
||||||
e.style.backgroundColor = "";
|
e.style.backgroundColor = "";
|
||||||
e.style.fontSize = "";
|
e.style.fontSize = "";
|
||||||
if (e.classList.contains("av")) {
|
e.style.removeProperty("--b3-parent-background")
|
||||||
e.querySelector(".av__container").setAttribute("style", "--av-background:var(--b3-theme-background)");
|
|
||||||
}
|
|
||||||
} else if (type === "style1") {
|
} else if (type === "style1") {
|
||||||
const colorList = color.split(Constants.ZWSP);
|
const colorList = color.split(Constants.ZWSP);
|
||||||
e.style.backgroundColor = colorList[0];
|
e.style.backgroundColor = colorList[0];
|
||||||
e.style.color = colorList[1];
|
e.style.color = colorList[1];
|
||||||
if (e.classList.contains("av")) {
|
e.style.setProperty('--b3-parent-background', colorList[0]);
|
||||||
e.querySelector(".av__container").setAttribute("style", `--av-background:${colorList[0]}`);
|
|
||||||
}
|
|
||||||
} else if (type === "style2") {
|
} else if (type === "style2") {
|
||||||
e.style.webkitTextStroke = "0.2px var(--b3-theme-on-background)";
|
e.style.webkitTextStroke = "0.2px var(--b3-theme-on-background)";
|
||||||
e.style.webkitTextFillColor = "transparent";
|
e.style.webkitTextFillColor = "transparent";
|
||||||
|
|
@ -242,9 +238,7 @@ export const fontEvent = (protyle: IProtyle, nodeElements: Element[], type?: str
|
||||||
e.style.color = color;
|
e.style.color = color;
|
||||||
} else if (type === "backgroundColor") {
|
} else if (type === "backgroundColor") {
|
||||||
e.style.backgroundColor = color;
|
e.style.backgroundColor = color;
|
||||||
if (e.classList.contains("av")) {
|
e.style.setProperty('--b3-parent-background', color);
|
||||||
e.querySelector(".av__container").setAttribute("style", `--av-background:${color}`);
|
|
||||||
}
|
|
||||||
} else if (type === "fontSize") {
|
} else if (type === "fontSize") {
|
||||||
e.style.fontSize = color;
|
e.style.fontSize = color;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue