diff --git a/theme/src/client/styles/code.scss b/theme/src/client/styles/code.scss index 1574c084..ff6fe4b5 100644 --- a/theme/src/client/styles/code.scss +++ b/theme/src/client/styles/code.scss @@ -9,53 +9,8 @@ html:not(.dark) .vp-code span { color: var(--shiki-light, rgba(60, 60, 67, 0.78)); } -code[class*='language-'], -pre[class*='language-'] { - color: var(--vp-code-block-color); - background: none; - font-family: var(--vp-font-family-mono); - font-size: var(--vp-code-font-size); - text-align: left; - white-space: pre; - word-spacing: normal; - word-break: normal; - word-wrap: normal; - line-height: var(--vp-code-line-height); - - -moz-tab-size: 4; - -o-tab-size: 4; - tab-size: 4; - - -webkit-hyphens: none; - -moz-hyphens: none; - -ms-hyphens: none; - hyphens: none; -} - -/* Code blocks */ -pre[class*='language-'] { - padding: 1em; - margin: 0.5em 0; - overflow: auto; -} - -// :not(pre) > code[class*='language-'], -// pre[class*='language-'] { -// background: var(--vp-code-block-bg); -// } - -// /* Inline code */ -// :not(pre) > code[class*='language-'] { -// padding: 0.1em; -// border-radius: 0.3em; -// white-space: normal; -// } - -// =============================== - .plume-content { - pre, - pre[class*='language-'] { + pre { // line-height: 1.4; padding: 1.3rem 1.5rem; margin: 0 0 0.85rem 0; @@ -107,8 +62,12 @@ div[class*='language-'] { color: var(--vp-code-line-number-color); } - pre, - pre[class*='language-'] { + code { + display: inline-block; + min-width: 100%; + } + + pre { // force override the background color to be compatible with shiki background: transparent !important; position: relative; @@ -270,7 +229,7 @@ div[class*='language-'] { } .hint-container div[class*='language-'] { - margin: 0.85rem -1rem 0.85rem -1rem; + margin: 0.85rem -1rem 0.85rem -1.25rem; } } diff --git a/theme/src/client/styles/md-enhance.scss b/theme/src/client/styles/md-enhance.scss index 37a0ed12..cacb5607 100644 --- a/theme/src/client/styles/md-enhance.scss +++ b/theme/src/client/styles/md-enhance.scss @@ -166,4 +166,41 @@ margin: 8px -12px; } } + + .task-list-container { + padding-left: 0; + .task-list-item { + input { + width: 0; + height: 0; + padding: 0; + margin: 0; + } + label { + margin-left: 1.2em; + } + input::before, + input::after { + content: none; + position: absolute; + top: -1em; + left: 0; + font-size: 1em; + display: inline-block; + } + + input::after { + content: url('data:image/svg+xml,%3Csvg xmlns="http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg" width="1em" height="1em" viewBox="0 0 32 32"%3E%3Cpath fill="%23c2c2c4" d="M26 27.5H6A1.5 1.5 0 0 1 4.5 26V6c0-.83.67-1.5 1.5-1.5h20c.828 0 1.5.67 1.5 1.5v20a1.5 1.5 0 0 1-1.5 1.5m-18.5-3h17v-17h-17z"%2F%3E%3C%2Fsvg%3E'); + border: none; + background-color: transparent; + } + + input:checked[disabled]::after { + content: url('data:image/svg+xml,%3Csvg xmlns="http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg" width="1em" height="1em" viewBox="0 0 32 32"%3E%3Cpath fill="%23299764" d="M29.548 3.043a2.5 2.5 0 0 0-3.513.4L16 16.067l-3.508-4.414a2.5 2.5 0 0 0-3.915 3.112l5.465 6.875c.474.597 1.195.943 1.957.943s1.482-.35 1.957-.944L29.95 6.555c.86-1.08.68-2.654-.402-3.513zM24.5 24.5h-17v-17h12.756l2.385-3H6c-.83 0-1.5.67-1.5 1.5v20c0 .828.67 1.5 1.5 1.5h20a1.5 1.5 0 0 0 1.5-1.5V12.85l-3 3.774z"%2F%3E%3C%2Fsvg%3E'); + border: none; + background-color: transparent; + + } + } + } }