diff --git a/src/pages/plugin/plugin.scss b/src/pages/plugin/plugin.scss index bc2ab0f53..cc2284d0e 100644 --- a/src/pages/plugin/plugin.scss +++ b/src/pages/plugin/plugin.scss @@ -268,6 +268,26 @@ display: block; } + .content-section.md { + overflow-x: hidden; + overflow-wrap: break-word; + + img { + max-width: 100%; + height: auto; + } + + pre { + overflow-x: auto; + max-width: 100%; + } + + * { + max-width: 100%; + box-sizing: border-box; + } + } + .contributor { display: flex; align-items: center; diff --git a/src/pages/plugin/plugin.view.js b/src/pages/plugin/plugin.view.js index 600511ae3..6ed0b0886 100644 --- a/src/pages/plugin/plugin.view.js +++ b/src/pages/plugin/plugin.view.js @@ -186,7 +186,7 @@ export default (props) => {
{(() => { @@ -223,7 +223,7 @@ export default (props) => { id="changelog" className="content-section md" innerHTML={ - DOMPurify.sanitize(changelogs) || + DOMPurify.sanitize(changelogs, { FORBID_TAGS: ["style"] }) || `
diff --git a/src/styles/markdown.scss b/src/styles/markdown.scss index 2b0b95c6f..f643f9a8e 100644 --- a/src/styles/markdown.scss +++ b/src/styles/markdown.scss @@ -119,11 +119,10 @@ hr { display: block; - height: 2px; + height: 0; border: 0; - border-top: 1px solid #aaa; - border-bottom: 1px solid #eee; - margin: 1em 0; + border-top: 1px solid var(--border-color, #3d444d); + margin: 1.5em 0; padding: 0; } @@ -253,6 +252,30 @@ table { border-collapse: collapse; border-spacing: 0; + width: 100%; + margin: 1em 0; + display: block; + overflow-x: auto; + + th, + td { + padding: 8px 12px; + border: 1px solid var(--border-color, #3d444d); + text-align: left; + } + + th { + background-color: rgba(255, 255, 255, 0.05); + font-weight: 600; + } + + tr:nth-child(even) { + background-color: rgba(255, 255, 255, 0.02); + } + + tr:hover { + background-color: rgba(255, 255, 255, 0.05); + } } td { @@ -344,6 +367,7 @@ page-break-after: avoid; } } + .markdown-alert { padding: 0.5rem 1rem; margin-bottom: 16px; @@ -351,11 +375,11 @@ border-left: 0.25em solid #888; } - .markdown-alert > :first-child { + .markdown-alert> :first-child { margin-top: 0; } - .markdown-alert > :last-child { + .markdown-alert> :last-child { margin-bottom: 0; } @@ -413,6 +437,7 @@ .markdown-alert.markdown-alert-caution .markdown-alert-title { color: var(--color-caution); } + .task-list-item { list-style-type: none; @@ -424,7 +449,7 @@ cursor: pointer; } - & + .task-list-item { + &+.task-list-item { margin-top: 0.25rem; } @@ -446,6 +471,7 @@ } .contains-task-list { + &:hover .task-list-item-convert-container, &:focus-within .task-list-item-convert-container { display: block; @@ -455,4 +481,4 @@ clip: auto; } } -} +} \ No newline at end of file