mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 09:00:12 +01:00
💄 block margin
This commit is contained in:
parent
78f3d0ac74
commit
38cd0118c0
3 changed files with 7 additions and 5 deletions
|
|
@ -6,6 +6,8 @@
|
||||||
.b3-typography,
|
.b3-typography,
|
||||||
.protyle-wysiwyg {
|
.protyle-wysiwyg {
|
||||||
font-variant-ligatures: no-common-ligatures;
|
font-variant-ligatures: no-common-ligatures;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
|
||||||
img {
|
img {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
|
|
@ -22,7 +24,7 @@
|
||||||
[data-node-id] {
|
[data-node-id] {
|
||||||
line-height: 1.625;
|
line-height: 1.625;
|
||||||
padding: 4px;
|
padding: 4px;
|
||||||
margin: 4px 0;
|
margin: 2px 0;
|
||||||
border-radius: var(--b3-border-radius);
|
border-radius: var(--b3-border-radius);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
.protyle-wysiwyg {
|
.protyle-wysiwyg {
|
||||||
padding: 34px 16px 16px 24px;
|
padding: 34px 16px 16px 24px;
|
||||||
cursor: text;
|
cursor: text;
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
user-select: auto;
|
user-select: auto;
|
||||||
overflow-x: clip;
|
overflow-x: clip;
|
||||||
|
|
|
||||||
|
|
@ -35,8 +35,10 @@ export const highlightRender = (element: Element, cdn = Constants.PROTYLE_CDN) =
|
||||||
addScript(`${cdn}/js/highlight.js/third-languages.js?v=1.0.1`, "protyleHljsThirdScript").then(() => {
|
addScript(`${cdn}/js/highlight.js/third-languages.js?v=1.0.1`, "protyleHljsThirdScript").then(() => {
|
||||||
codeElements.forEach((block: HTMLElement) => {
|
codeElements.forEach((block: HTMLElement) => {
|
||||||
const iconElements = block.parentElement.querySelectorAll(".protyle-icon");
|
const iconElements = block.parentElement.querySelectorAll(".protyle-icon");
|
||||||
iconElements[0].setAttribute("aria-label", window.siyuan.languages.copy);
|
if (iconElements.length === 2) {
|
||||||
iconElements[1].setAttribute("aria-label", window.siyuan.languages.more);
|
iconElements[0].setAttribute("aria-label", window.siyuan.languages.copy);
|
||||||
|
iconElements[1].setAttribute("aria-label", window.siyuan.languages.more);
|
||||||
|
}
|
||||||
if (block.getAttribute("data-render") === "true") {
|
if (block.getAttribute("data-render") === "true") {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue