mirror of
https://github.com/mayurankv/Obsidian-Code-Styler.git
synced 2026-07-22 08:10:29 +00:00
Split up css
This commit is contained in:
parent
c97021a418
commit
c0d71d82e8
10 changed files with 2918 additions and 594 deletions
5
.github/TODO.md
vendored
5
.github/TODO.md
vendored
|
|
@ -1,11 +1,10 @@
|
|||
# TODO
|
||||
|
||||
1. Split up CSS files as described on Obsidian discord
|
||||
2. Check through:
|
||||
1. Check through:
|
||||
- `package.json`
|
||||
- `package-lock.json`
|
||||
- `eslintrc`
|
||||
3. Update github:
|
||||
2. Update github:
|
||||
- Better issue templates using [yaml](https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/configuring-issue-templates-for-your-repository)
|
||||
- [Example 1](https://github.com/javalent/admonitions/tree/main/.github/ISSUE_TEMPLATE)
|
||||
- [Example 2](https://github.com/obsidian-tasks-group/obsidian-tasks/tree/main/.github/ISSUE_TEMPLATE)
|
||||
|
|
|
|||
1162
css/styles.css
Normal file
1162
css/styles.css
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -15,7 +15,10 @@ const context = await esbuild.context({
|
|||
banner: {
|
||||
js: banner,
|
||||
},
|
||||
entryPoints: ["src/main.ts"],
|
||||
entryPoints: [
|
||||
"src/main.ts",
|
||||
"src/styles.css",
|
||||
],
|
||||
bundle: true,
|
||||
external: [
|
||||
"obsidian",
|
||||
|
|
@ -37,7 +40,7 @@ const context = await esbuild.context({
|
|||
logLevel: "info",
|
||||
sourcemap: prod ? false : "inline",
|
||||
treeShaking: true,
|
||||
outfile: "main.js",
|
||||
outdir: "./",
|
||||
});
|
||||
|
||||
if (prod) {
|
||||
|
|
@ -45,4 +48,4 @@ if (prod) {
|
|||
process.exit(0);
|
||||
} else {
|
||||
await context.watch();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
486
src/css/codeblocks.css
Normal file
486
src/css/codeblocks.css
Normal file
|
|
@ -0,0 +1,486 @@
|
|||
/** Pre elements */
|
||||
.code-styler-pre-parent{
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
.code-styler pre.code-styler-pre {
|
||||
background: var(--code-styler-codeblock-background-colour) !important;
|
||||
border-radius: var(--border-radius) !important;
|
||||
min-height: unset;
|
||||
padding: 0px !important;
|
||||
overflow: hidden !important;
|
||||
}
|
||||
.code-styler pre.code-styler-pre[class*='language-'] {
|
||||
background: linear-gradient(90deg, var(--language-border-colour), var(--language-border-colour) var(--language-border-width), var(--code-styler-codeblock-background-colour) var(--language-border-width), var(--code-styler-codeblock-background-colour) 100%) !important;
|
||||
padding-left: var(--language-border-width) !important;
|
||||
}
|
||||
.code-styler pre.code-styler-pre code {
|
||||
display: grid;
|
||||
grid-template-columns: min-content auto;
|
||||
grid-template-rows: auto;
|
||||
padding-top: var(--code-padding) !important;
|
||||
padding-bottom: var(--code-padding) !important;
|
||||
padding-left: 0px !important;
|
||||
padding-right: 0px !important;
|
||||
border-radius: 0px !important;
|
||||
background: none !important;
|
||||
transition: max-height ease-in-out var(--duration-button), padding ease-in-out var(--duration-button), border-top ease-in-out var(--duration-button);
|
||||
max-height: 0;
|
||||
overflow-x: scroll;
|
||||
}
|
||||
.code-styler pre.code-styler-pre code:not(:has( > input[style*="display: inline;"])):active {
|
||||
--line-wrapping: var(--line-active-wrapping) !important;
|
||||
}
|
||||
.code-styler pre.code-styler-pre.code-styler-collapsed code {
|
||||
padding-top: 0 !important;
|
||||
padding-bottom: 0 !important;
|
||||
}
|
||||
.code-styler pre.code-styler-pre::before,
|
||||
.code-styler pre.code-styler-pre::after {
|
||||
content: none !important;
|
||||
}
|
||||
.markdown-source-view.mod-cm6 .cm-embed-block pre.code-styler-pre {
|
||||
margin: 1em 0px;
|
||||
}
|
||||
|
||||
/** Editing Mode Body */
|
||||
.code-styler .markdown-source-view [class*="code-styler-line"].HyperMD-codeblock-begin {
|
||||
border-top-left-radius: 0px !important;
|
||||
border-top-right-radius: 0px !important;
|
||||
border-top: none !important;
|
||||
}
|
||||
.code-styler .markdown-source-view [class*="code-styler-line"].HyperMD-codeblock-end {
|
||||
border-bottom-left-radius: var(--border-radius);
|
||||
border-bottom-right-radius: var(--border-radius);
|
||||
}
|
||||
body:not(.code-styler-show-langicons-always):not(.code-styler-show-langnames-always) .markdown-source-view :not(pre.code-styler-pre) > .code-styler-header-container + .HyperMD-codeblock-begin,
|
||||
body:not(.code-styler-show-langnames-always) .markdown-source-view :not(pre.code-styler-pre) > .code-styler-header-container:not(:has( img.code-styler-icon)) + .HyperMD-codeblock-begin,
|
||||
body .markdown-source-view :not(pre.code-styler-pre) > .code-styler-header-container:not(:has([class*='code-styler-header-language-tag-'])) + .HyperMD-codeblock-begin,
|
||||
body .markdown-source-view :not([class^='code-styler-header-container']) + [class*="code-styler-line"].HyperMD-codeblock-begin,
|
||||
body .markdown-source-view [class*="code-styler-line"].HyperMD-codeblock-begin:nth-of-type(1) { /*? Depending on header visibility */
|
||||
border-top-left-radius: var(--border-radius) !important;
|
||||
border-top-right-radius: var(--border-radius) !important;
|
||||
}
|
||||
.code-styler .markdown-source-view .HyperMD-codeblock[class*='code-styler-line'] {
|
||||
background: linear-gradient(90deg, var(--gradient-background-colour) var(--gradient-highlights-colour-stop), transparent 100%), var(--code-styler-codeblock-background-colour) !important;
|
||||
overflow: hidden;
|
||||
padding: 0 !important;
|
||||
padding-left: var(--size-4-4) !important;
|
||||
}
|
||||
.code-styler .markdown-source-view .HyperMD-codeblock[class*='code-styler-line'][class*='language-'] {
|
||||
background: linear-gradient(90deg, var(--language-border-colour), var(--language-border-colour) var(--language-border-width), var(--gradient-background-colour) var(--language-border-width) var(--gradient-highlights-colour-stop), transparent 100%), var(--code-styler-codeblock-background-colour) !important;
|
||||
}
|
||||
.code-styler .markdown-source-view .HyperMD-codeblock[class*='code-styler-line'][class*='language-'] [class^='code-styler-line-number'] {
|
||||
margin-left: var(--language-border-width);
|
||||
}
|
||||
|
||||
/** Header styling */
|
||||
body:not([class*='code-styler-show-langicons']) .code-styler-header-container-specific div:has(> img.code-styler-icon),
|
||||
body:not(.code-styler-show-langicons-always) .code-styler-header-container div:has(> img.code-styler-icon) {
|
||||
display: none;
|
||||
}
|
||||
body:not([class*='code-styler-show-langnames']) .code-styler-header-container-specific [class^="code-styler-header-language-tag"],
|
||||
body:not(.code-styler-show-langnames-always) .code-styler-header-container [class^="code-styler-header-language-tag"] {
|
||||
display: none;
|
||||
}
|
||||
body:not(.code-styler-show-langicons-always):not(.code-styler-show-langnames-always) .code-styler-header-container,
|
||||
body:not(.code-styler-show-langnames-always) .code-styler-header-container:not(:has( img.code-styler-icon)) {
|
||||
display: none !important;
|
||||
}
|
||||
body .markdown-source-view :not(pre.code-styler-pre) > .code-styler-header-container:not([class*='language-']),
|
||||
body pre.code-styler-pre:not([class*='language-']) .code-styler-header-container {
|
||||
display: none !important;
|
||||
}
|
||||
[class^='code-styler-header-container'] {
|
||||
font-size: var(--header-font-size);
|
||||
user-select: none;
|
||||
height: var(--container-height);
|
||||
min-height: var(--container-min-height);
|
||||
padding-top: var(--header-padding);
|
||||
margin-top: 0px !important;
|
||||
display: flex !important;
|
||||
overflow: visible;
|
||||
transition: border-bottom ease-in-out var(--duration-button);
|
||||
box-sizing: content-box;
|
||||
}
|
||||
.markdown-source-view :not(pre.code-styler-pre) > [class^='code-styler-header-container'] {
|
||||
background: linear-gradient(var(--code-styler-header-background-colour) 0%,var(--code-styler-header-background-colour) calc(100% - var(--header-separator-width)), var(--code-styler-header-separator-colour) calc(100% - var(--header-separator-width)), var(--code-styler-header-separator-colour) 100%) var(--language-border-width) bottom/100% border-box no-repeat,var(--language-border-colour) !important;
|
||||
padding-left: var(--language-border-width);
|
||||
border-top-left-radius: var(--border-radius);
|
||||
border-top-right-radius: var(--border-radius);
|
||||
padding-bottom: var(--header-separator-width);
|
||||
border-top: var(--code-styler-header-border);
|
||||
border-left: var(--code-styler-header-border);
|
||||
border-right: var(--code-styler-header-border);
|
||||
}
|
||||
pre.code-styler-pre [class^='code-styler-header-container'] {
|
||||
background-color: var(--code-styler-header-background-colour);
|
||||
border-bottom: var(--header-separator-width) solid var(--code-styler-header-separator-colour);
|
||||
}
|
||||
.markdown-source-view :not(pre.code-styler-pre) > [class^='code-styler-header-container']:not(:has(+ .HyperMD-codeblock-begin)) {
|
||||
background: linear-gradient(var(--code-styler-header-background-colour) 0%,var(--code-styler-header-background-colour) 100%) var(--language-border-width) bottom/100% border-box no-repeat,var(--language-border-colour) !important;
|
||||
padding-bottom: var(--header-padding);
|
||||
border-bottom-left-radius: var(--border-radius);
|
||||
border-bottom-right-radius: var(--border-radius);
|
||||
border-bottom: var(--code-styler-header-border);
|
||||
border-bottom: var(--collapsed-bottom-border);
|
||||
}
|
||||
pre.code-styler-pre.code-styler-collapsed [class^='code-styler-header-container'] {
|
||||
border-bottom: var(--collapsed-bottom-border);
|
||||
}
|
||||
[class^='code-styler-header-container'] [class^="code-styler-header-language-tag"] {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-content: center;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
padding-left: var(--header-spacing);
|
||||
padding-right: var(--header-spacing);
|
||||
margin-right: var(--header-spacing);
|
||||
padding-top: calc(1em * var(--header-inner-vertical-padding));
|
||||
padding-bottom: calc(1em * var(--header-inner-vertical-padding));
|
||||
font-size: inherit;
|
||||
border-radius: var(--border-radius) var(--border-radius) 0px 0px;
|
||||
background-color: var(--code-styler-header-language-tag-background-colour);
|
||||
color: var(--code-styler-header-language-tag-text-colour);
|
||||
font-weight: var(--code-styler-header-language-tag-text-bold, normal);
|
||||
font-style: var(--code-styler-header-language-tag-text-italic, normal);
|
||||
text-align: center;
|
||||
transition: border-radius ease-in-out var(--duration-button), padding ease-in-out var(--duration-button);
|
||||
}
|
||||
.markdown-source-view :not(pre.code-styler-pre) > [class^='code-styler-header-container']:not(:has(+ .HyperMD-codeblock-begin)) [class^="code-styler-header-language-tag"],
|
||||
pre.code-styler-pre.code-styler-collapsed [class^='code-styler-header-container'] [class^="code-styler-header-language-tag"] {
|
||||
border-radius: var(--border-radius);
|
||||
}
|
||||
.code-styler-header-text {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-content: center;
|
||||
flex-direction: column;
|
||||
padding-left: 0px;
|
||||
padding-top: calc(1em * var(--header-inner-vertical-padding));
|
||||
padding-bottom: calc(1em * var(--header-inner-vertical-padding));
|
||||
font-size: inherit;
|
||||
color: var(--code-styler-header-text-colour);
|
||||
font-weight: var(--code-styler-header-title-text-bold, normal);
|
||||
font-style: var(--code-styler-header-title-text-italic, normal);
|
||||
transition: padding ease-in-out var(--duration-button);
|
||||
}
|
||||
body:not([class*='code-styler-show-langicons']) .code-styler-header-container-specific [class^="code-styler-header-language-tag"],
|
||||
body:not(.code-styler-show-langicons-always) .code-styler-header-container [class^="code-styler-header-language-tag"],
|
||||
body .code-styler-header-container-specific:not(:has( div > img.code-styler-icon)) [class^="code-styler-header-language-tag"] { /*? Depending on header visibility */
|
||||
border-top-left-radius: 0 !important;
|
||||
border-bottom-left-radius: 0 !important;
|
||||
}
|
||||
body:not([class*='code-styler-show-langicons']):not([class*='code-styler-show-langnames']) .code-styler-header-container-specific .code-styler-header-text,
|
||||
body:not(.code-styler-show-langicons-always):not(.code-styler-show-langnames) .code-styler-header-container .code-styler-header-text,
|
||||
body .code-styler-header-container-specific:not(:has( [class^="code-styler-header-language-tag-"])) .code-styler-header-text { /*? Depending on header visibility */
|
||||
padding-left: var(--header-spacing);
|
||||
}
|
||||
div:has(> img.code-styler-icon) {
|
||||
display: inline-flex;
|
||||
justify-content: center;
|
||||
align-content: center;
|
||||
flex-direction: column;
|
||||
padding-top: calc(1em * var(--header-inner-vertical-padding));
|
||||
padding-bottom: calc(1em * var(--header-inner-vertical-padding));
|
||||
padding-left: var(--header-spacing);
|
||||
padding-right: var(--header-spacing);
|
||||
transition: padding ease-in-out var(--duration-button);
|
||||
}
|
||||
.code-styler-icon {
|
||||
width: var(--language-icon-size);
|
||||
height: var(--language-icon-size);
|
||||
filter: var(--language-icon-filter);
|
||||
margin: 0 !important;
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
/** Lines */
|
||||
pre.code-styler-pre [class^='code-styler-line-highlighted'] > .code-styler-line-text {
|
||||
background-image: linear-gradient(90deg, var(--gradient-background-colour) 0% var(--gradient-highlights-colour-stop), var(--code-styler-codeblock-background-colour) 100%);
|
||||
}
|
||||
.code-styler-line-highlighted {
|
||||
--gradient-background-colour: var(--code-styler-default-highlight-colour) !important;
|
||||
}
|
||||
.code-styler-active-line-highlight .cm-active,
|
||||
.code-styler-active-line-highlight-editor .cm-active {
|
||||
background: linear-gradient(to right, var(--code-styler-active-editor-line-colour), var(--gradient-highlights-colour-stop), transparent) !important;
|
||||
}
|
||||
.code-styler-active-line-highlight .markdown-source-view .HyperMD-codeblock[class*="code-styler-line"].cm-active,
|
||||
.code-styler-active-line-highlight-codeblock .markdown-source-view .HyperMD-codeblock[class*="code-styler-line"].cm-active {
|
||||
background: linear-gradient(to right, var(--code-styler-active-codeblock-line-colour), var(--gradient-highlights-colour-stop), var(--code-styler-codeblock-background-colour)) !important;
|
||||
}
|
||||
|
||||
/** Line numbers */
|
||||
.code-styler:not(.code-styler-show-line-numbers) .code-styler-line-number,
|
||||
.code-styler-line-number-hide {
|
||||
display: none;
|
||||
}
|
||||
pre.code-styler-pre > code > div:first-child > [class^='code-styler-line-number'] { /*? Maintain gutter colour when padded */
|
||||
box-shadow: 0px calc(-1 * var(--code-padding)) var(--code-styler-gutter-background-colour);
|
||||
transition: box-shadow ease-in-out var(--duration-button);
|
||||
}
|
||||
pre.code-styler-pre.code-styler-collapsed > code > div:first-child > [class^='code-styler-line-number'] { /*? Maintain gutter colour when padded */
|
||||
box-shadow: 0px 0px var(--code-styler-gutter-background-colour);
|
||||
}
|
||||
pre.code-styler-pre > code > div:last-child > [class^='code-styler-line-number'] { /*? Maintain gutter colour when padded */
|
||||
box-shadow: 0px var(--code-padding) var(--code-styler-gutter-background-colour);
|
||||
}
|
||||
pre.code-styler-pre > code > div:only-child > [class^='code-styler-line-number'] { /*? Maintain gutter colour when padded */
|
||||
box-shadow: 0px calc(-1 * var(--code-padding)) var(--code-styler-gutter-background-colour),0px var(--code-padding) var(--code-styler-gutter-background-colour);
|
||||
}
|
||||
[class^='code-styler-line-number'] {
|
||||
padding-left: calc(4px + var(--language-border-width));
|
||||
padding-right: 8px;
|
||||
text-align: right;
|
||||
min-width: var(--line-number-gutter-min-width);
|
||||
background-color: var(--code-styler-gutter-background-colour);
|
||||
font-size: var(--code-size);
|
||||
font-family: var(--font-monospace);
|
||||
color: var(--code-styler-gutter-text-colour);
|
||||
user-select: none;
|
||||
}
|
||||
.markdown-source-view .HyperMD-codeblock .code-styler-line-number,
|
||||
.markdown-source-view .HyperMD-codeblock .code-styler-line-number-specific {
|
||||
padding-top: var(--line-number-height-correction);
|
||||
position: absolute;
|
||||
box-sizing: content-box;
|
||||
display: inline-block;
|
||||
height: 100%;
|
||||
min-width: calc(var(--line-number-gutter-min-width) - 12px);
|
||||
overflow-x: auto;
|
||||
direction: rtl;
|
||||
left: 0;
|
||||
}
|
||||
.markdown-source-view .HyperMD-codeblock-begin .code-styler-line-number,
|
||||
.markdown-source-view .HyperMD-codeblock-begin .code-styler-line-number-specific,
|
||||
.markdown-source-view .HyperMD-codeblock-end .code-styler-line-number,
|
||||
.markdown-source-view .HyperMD-codeblock-end .code-styler-line-number-specific {
|
||||
width: var(--line-number-gutter-width);
|
||||
}
|
||||
pre.code-styler-pre [class^='code-styler-line-number'] {
|
||||
white-space: nowrap;
|
||||
grid-column: 1;
|
||||
position: sticky;
|
||||
top: -1px;
|
||||
left: 0;
|
||||
border-top: var(--line-number-height-correction) solid transparent;
|
||||
}
|
||||
pre.code-styler-pre div:last-child > [class^='code-styler-line-number'] {
|
||||
width: unset;
|
||||
}
|
||||
.code-styler-gutter-highlight pre.code-styler-pre [class*="code-styler-line-highlighted"] [class^='code-styler-line-number'] {
|
||||
background-color: var(--gradient-background-colour);
|
||||
}
|
||||
.code-styler-active-line-highlight.code-styler-gutter-highlight .markdown-source-view .HyperMD-codeblock[class*="code-styler-line"].cm-active [class^='code-styler-line-number'],
|
||||
.code-styler-active-line-highlight-codeblock.code-styler-gutter-highlight .markdown-source-view .HyperMD-codeblock[class*="code-styler-line"].cm-active [class^='code-styler-line-number'],
|
||||
.code-styler-gutter-highlight [class*="code-styler-line-highlighted"] [class^='code-styler-line-number'] {
|
||||
background-color: rgba(0,0,0,0);
|
||||
}
|
||||
.code-styler-gutter-active-line .cm-active [class^='code-styler-line-number']{
|
||||
color: var(--code-styler-gutter-active-text-colour);
|
||||
}
|
||||
.code-styler.code-styler-show-line-numbers .markdown-source-view .HyperMD-codeblock:has(.code-styler-line-number),
|
||||
.code-styler.code-styler-show-line-numbers .markdown-source-view .HyperMD-codeblock:has(.code-styler-line-number-specific) {
|
||||
padding-left: calc(12px + var(--language-border-width) + var(--line-number-gutter-width) + var(--line-number-gutter-padding)) !important;
|
||||
}
|
||||
.code-styler .markdown-source-view .HyperMD-codeblock[class*='code-styler-line']::before {
|
||||
content: none !important;
|
||||
}
|
||||
|
||||
/** Line text */
|
||||
pre.code-styler-pre > code > div[class*='code-styler-line'] {
|
||||
display: contents !important;
|
||||
}
|
||||
pre.code-styler-pre .code-styler-line-text {
|
||||
flex-basis: 100%;
|
||||
padding-left: var(--line-number-gutter-padding);
|
||||
grid-column: 2;
|
||||
}
|
||||
.HyperMD-codeblock:has(> .cm-widgetBuffer) { /*? Prevent Line Wraps */
|
||||
white-space: nowrap;
|
||||
}
|
||||
.HyperMD-codeblock:has(> .cm-widgetBuffer) > .cm-hmd-codeblock { /*? Prevent Line Wraps */
|
||||
white-space: break-spaces;
|
||||
}
|
||||
|
||||
/** Buttons */
|
||||
@keyframes outdent {
|
||||
from {
|
||||
margin-right: calc(var(--copy-code-header-right-margin) - var(--dent-difference));
|
||||
clip-path: var(--polygon-in);
|
||||
}
|
||||
to {
|
||||
margin-right: var(--copy-code-header-right-margin);
|
||||
clip-path: var(--polygon-out);
|
||||
}
|
||||
}
|
||||
@keyframes indent {
|
||||
from {
|
||||
margin-right: var(--copy-code-header-right-margin);
|
||||
clip-path: var(--polygon-out);
|
||||
}
|
||||
to {
|
||||
margin-right: calc(var(--copy-code-header-right-margin) - var(--dent-difference));
|
||||
clip-path: var(--polygon-in);
|
||||
}
|
||||
}
|
||||
@keyframes reverse-outdent {
|
||||
from {
|
||||
clip-path: var(--polygon-in);
|
||||
}
|
||||
to {
|
||||
clip-path: var(--polygon-out);
|
||||
}
|
||||
}
|
||||
@keyframes reverse-indent {
|
||||
from {
|
||||
clip-path: var(--polygon-out);
|
||||
}
|
||||
to {
|
||||
clip-path: var(--polygon-in);
|
||||
}
|
||||
}
|
||||
.markdown-rendered pre.code-styler-pre button {
|
||||
transition: visibility var(--duration-button), opacity var(--duration-button);
|
||||
visibility: visible;
|
||||
opacity: 1;
|
||||
display: unset !important;
|
||||
color: var(--code-styler-button-colour) !important;
|
||||
background: transparent !important;
|
||||
box-shadow: none;
|
||||
font-family: var(--font-interface);
|
||||
font-size: var(--font-ui-smaller);
|
||||
margin: 0;
|
||||
padding: 0 !important;
|
||||
border: none !important;
|
||||
margin-top: 0 !important;
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
pre.code-styler-pre:not(.code-styler-collapsed):not(:hover) button,
|
||||
pre.code-styler-pre.code-styler-collapsed button,
|
||||
pre.code-styler-pre:not(.code-styler-collapsed):not(:hover) [class^='code-styler-header-container']::after {
|
||||
visibility: hidden;
|
||||
opacity: 0
|
||||
}
|
||||
[class^='code-styler-header-container']::after {
|
||||
position: relative;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
margin: auto;
|
||||
margin-right: var(--header-button-spacing);
|
||||
content: "\200b";
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
background-color: var(--code-styler-button-colour);
|
||||
-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' xml:space='preserve'%3E%3Cpath d='M16 22 6 12l1.4-1.4 8.6 8.6 8.6-8.6L26 12z'/%3E%3Cpath fill='none' d='M0 0h32v32H0z'/%3E%3C/svg%3E");
|
||||
-webkit-mask-repeat: no-repeat;
|
||||
mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' %3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
|
||||
mask-repeat: no-repeat;
|
||||
visibility: visible;
|
||||
opacity: 1;
|
||||
scale: 0.8;
|
||||
transition: transform var(--duration-button) ease-out, visibility var(--duration-button), opacity var(--duration-button), scale var(--duration-button) cubic-bezier(0.4, 0.14, 0.3, 1);
|
||||
}
|
||||
pre.code-styler-pre.code-styler-collapsed [class^='code-styler-header-container']::after,
|
||||
.markdown-source-view :not(pre.code-styler-pre) > [class^='code-styler-header-container']:not(:has(+ .HyperMD-codeblock-begin))::after {
|
||||
transform: rotate(-90deg);
|
||||
}
|
||||
[class^='code-styler-header-container']:hover::after {
|
||||
scale: 1;
|
||||
}
|
||||
body:not(.code-styler-show-langicons-always):not(.code-styler-show-langnames-always) pre.code-styler-pre:has( .code-styler-header-container) button.copy-code-button,
|
||||
body:not(.code-styler-show-langnames-always) pre.code-styler-pre:not(:has( .code-styler-header-container-specific)):not(:has( .code-styler-header-container img.code-styler-icon)) button.copy-code-button,
|
||||
body pre.code-styler-pre:not([class*='language-']):has(.code-styler-header-container) button.copy-code-button { /*? Depending on header visibility */
|
||||
top: calc(0.5 * var(--font-text-size) * 0.875 * var(--line-height-normal)) !important;
|
||||
--copy-code-header-right-margin: 12px;
|
||||
}
|
||||
body:not(.code-styler-show-langicons-always):not(.code-styler-show-langnames-always) .markdown-source-view :not(pre.code-styler-pre) > .code-styler-header-container + .HyperMD-codeblock-begin,
|
||||
body:not(.code-styler-show-langnames-always) .markdown-source-view :not(pre.code-styler-pre) > .code-styler-header-container:not(:has( img.code-styler-icon)) + .HyperMD-codeblock-begin,
|
||||
body .markdown-source-view :not(pre.code-styler-pre) > .code-styler-header-container:not(:has([class*='code-styler-header-language-tag-'])) + .HyperMD-codeblock-begin { /*? Depending on header visibility */
|
||||
overflow: hidden;
|
||||
}
|
||||
body:not(.code-styler-show-langicons-always):not(.code-styler-show-langnames-always) .markdown-source-view :not(pre.code-styler-pre) > .code-styler-header-container + .HyperMD-codeblock-begin span.code-block-flair,
|
||||
body:not(.code-styler-show-langnames-always) .markdown-source-view :not(pre.code-styler-pre) > .code-styler-header-container:not(:has( img.code-styler-icon)) + .HyperMD-codeblock-begin span.code-block-flair,
|
||||
body .markdown-source-view :not(pre.code-styler-pre) > .code-styler-header-container:not(:has([class*='code-styler-header-language-tag-'])) + .HyperMD-codeblock-begin span.code-block-flair { /*? Depending on header visibility */
|
||||
top: calc(0.5 * var(--font-text-size) * 0.875 * var(--line-height-normal)) !important;
|
||||
--copy-code-header-right-margin: 12px;
|
||||
}
|
||||
pre.code-styler-pre button.copy-code-button {
|
||||
transform: translateY(-50%);
|
||||
top: max(calc(0.5 * var(--container-height) * 1),calc(0.5 * var(--container-min-height) * 1)) !important;
|
||||
bottom: unset !important;
|
||||
}
|
||||
pre.code-styler-pre button.copy-code-button,
|
||||
pre.code-styler-pre button.run-code-button, /*? Execute Code Plugin Compatibility */
|
||||
.markdown-source-view.mod-cm6 .HyperMD-codeblock.code-styler-line span.code-block-flair {
|
||||
margin-right: calc(var(--copy-code-header-right-margin) - var(--dent-difference));
|
||||
will-change: margin-right, clip-path;
|
||||
clip-path: var(--polygon-in);
|
||||
}
|
||||
pre.code-styler-pre button.copy-code-button:not(:active),
|
||||
pre.code-styler-pre button.run-code-button:not(:active), /*? Execute Code Plugin Compatibility */
|
||||
.markdown-source-view.mod-cm6 .HyperMD-codeblock.code-styler-line span.code-block-flair:not(:active) {
|
||||
animation: indent var(--duration-button);
|
||||
}
|
||||
pre.code-styler-pre button.copy-code-button:hover,
|
||||
pre.code-styler-pre button.run-code-button:hover, /*? Execute Code Plugin Compatibility */
|
||||
.markdown-source-view.mod-cm6 .HyperMD-codeblock.code-styler-line span.code-block-flair:hover{
|
||||
background-color: transparent;
|
||||
animation: outdent var(--duration-button);
|
||||
margin-right: var(--copy-code-header-right-margin);
|
||||
clip-path: var(--polygon-out);
|
||||
}
|
||||
pre.code-styler-pre button.copy-code-button:active,
|
||||
pre.code-styler-pre button.run-code-button:active, /*? Execute Code Plugin Compatibility */
|
||||
.markdown-source-view.mod-cm6 .HyperMD-codeblock.code-styler-line span.code-block-flair:active {
|
||||
scale: 0.95;
|
||||
transition: scale var(--duration-button) cubic-bezier(0.4, 0.14, 0.3, 1);
|
||||
}
|
||||
pre.code-styler-pre button.copy-code-button::before,
|
||||
.markdown-source-view.mod-cm6 .HyperMD-codeblock.code-styler-line span.code-block-flair::before {
|
||||
content: "\200b";
|
||||
display: inline-block;
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
padding-right: 4px;
|
||||
background-color: var(--code-styler-button-colour);
|
||||
-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M28 10v18H10V10h18m0-2H10a2 2 0 0 0-2 2v18a2 2 0 0 0 2 2h18a2 2 0 0 0 2-2V10a2 2 0 0 0-2-2Z'/%3E%3Cpath d='M4 18H2V4a2 2 0 0 1 2-2h14v2H4Z'/%3E%3Cpath fill='none' d='M0 0h32v32H0z' data-name='<Transparent Rectangle>'/%3E%3C/svg%3E");
|
||||
-webkit-mask-repeat: no-repeat;
|
||||
mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M28 10v18H10V10h18m0-2H10a2 2 0 0 0-2 2v18a2 2 0 0 0 2 2h18a2 2 0 0 0 2-2V10a2 2 0 0 0-2-2Z'/%3E%3Cpath d='M4 18H2V4a2 2 0 0 1 2-2h14v2H4Z'/%3E%3Cpath fill='none' d='M0 0h32v32H0z' data-name='<Transparent Rectangle>'/%3E%3C/svg%3E");
|
||||
mask-repeat: no-repeat;
|
||||
vertical-align: 1px;
|
||||
}
|
||||
.markdown-source-view.mod-cm6 .HyperMD-codeblock.code-styler-line span.code-block-flair {
|
||||
transform: translateY(-50%);
|
||||
font-size: 0;
|
||||
top: min(calc(-0.5 * var(--container-height) * 1.1 - var(--header-separator-width)),calc(-0.5 * var(--container-min-height) * 1.1 - var(--header-separator-width))) !important;
|
||||
right: 0;
|
||||
visibility: hidden;
|
||||
padding: 0;
|
||||
position: absolute;
|
||||
line-height: initial !important;
|
||||
margin-top: 0 !important;
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
.markdown-source-view.mod-cm6 .HyperMD-codeblock.code-styler-line span.code-block-flair > * {
|
||||
width: 0px;
|
||||
}
|
||||
.markdown-source-view.mod-cm6 .HyperMD-codeblock.code-styler-line span.code-block-flair::before {
|
||||
visibility: visible;
|
||||
opacity: 1;
|
||||
vertical-align: -1px;
|
||||
font-size: var(--font-ui-smaller);
|
||||
}
|
||||
.markdown-source-view.mod-cm6 .HyperMD-codeblock.code-styler-line span.code-block-flair::after {
|
||||
visibility: visible;
|
||||
opacity: 1;
|
||||
font-size: var(--font-ui-smaller);
|
||||
content: 'Copy';
|
||||
color: var(--code-styler-button-colour);
|
||||
}
|
||||
.markdown-source-view.mod-cm6 .HyperMD-codeblock-begin.code-styler-line {
|
||||
overflow: visible;
|
||||
}
|
||||
57
src/css/inlineCode.css
Normal file
57
src/css/inlineCode.css
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
/** Inline Code */
|
||||
.code-styler .cm-s-obsidian span.cm-inline-code,
|
||||
.code-styler .markdown-rendered :not(pre) > code {
|
||||
font-weight: var(--code-styler-inline-font-weight);
|
||||
color: var(--code-styler-inline-colour);
|
||||
background-color: var(--code-styler-inline-background-colour) !important;
|
||||
border-radius: var(--code-styler-inline-border-radius) !important;
|
||||
padding: var(--code-styler-inline-padding-vertical) var(--code-styler-inline-padding-horizontal) !important;
|
||||
margin: 0px var(--code-styler-inline-margin-horizontal) !important;
|
||||
}
|
||||
|
||||
.code-styler .cm-s-obsidian span.cm-formatting-code { /*? Standalone backticks */
|
||||
color: var(--code-styler-inline-colour-active);
|
||||
display: inline !important;
|
||||
}
|
||||
|
||||
.code-styler .cm-s-obsidian span.cm-formatting-code:has(+ span.cm-inline-code:not(.cm-formatting-code)) {/*? First backtick */
|
||||
color: var(--code-styler-inline-colour-active);
|
||||
border-radius: var(--code-styler-inline-border-radius) 0px 0px var(--code-styler-inline-border-radius) !important;
|
||||
padding-left: var(--code-styler-inline-padding-horizontal) !important;
|
||||
padding-right: 0px !important;
|
||||
margin-left: var(--code-styler-inline-margin-horizontal) !important;
|
||||
margin-right: 0px !important;
|
||||
}
|
||||
|
||||
.code-styler .cm-s-obsidian span.cm-formatting-code + span.cm-inline-code:not(.cm-formatting-code) { /*? Inner code with backticks */
|
||||
color: var(--code-styler-inline-colour-active);
|
||||
border-radius: 0px !important;
|
||||
padding-left: 0px !important;
|
||||
padding-right: 0px !important;
|
||||
margin: 0px 0px !important;
|
||||
}
|
||||
|
||||
.code-styler .cm-s-obsidian span.cm-inline-code:not(.cm-formatting-code) + span.cm-formatting-code {/*? Last backtick */
|
||||
color: var(--code-styler-inline-colour-active);
|
||||
border-radius: 0px var(--code-styler-inline-border-radius) var(--code-styler-inline-border-radius) 0px !important;
|
||||
padding-left: 0px !important;
|
||||
padding-right: var(--code-styler-inline-padding-horizontal) !important;
|
||||
margin-left: 0px !important;
|
||||
margin-right: var(--code-styler-inline-margin-horizontal) !important;
|
||||
}
|
||||
.code-styler .markdown-rendered :not(pre) > code img.code-styler-inline-icon {
|
||||
height: calc(var(--code-size) * 1.2);
|
||||
margin-bottom: 2px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.code-styler .markdown-rendered :not(pre) > code .code-styler-inline-title {
|
||||
font-weight: var(--code-styler-inline-title-font-weight);
|
||||
color: var(--code-styler-inline-title-color);
|
||||
}
|
||||
.code-styler .markdown-rendered :not(pre) > code .code-styler-inline-title::after {
|
||||
content: '\FF5C';
|
||||
color: var(--code-styler-inline-title-color);
|
||||
}
|
||||
.code-styler .markdown-rendered :not(pre) > code span:has( > img.code-styler-inline-icon) {
|
||||
padding-right: 8px;
|
||||
}
|
||||
9
src/css/pdfExport.css
Normal file
9
src/css/pdfExport.css
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
div.print {
|
||||
--line-wrapping: pre-wrap !important;
|
||||
}
|
||||
.code-styler div.print pre.code-styler-pre code {
|
||||
max-height: unset;
|
||||
}
|
||||
.code-styler div.print pre.code-styler-pre.code-styler-collapsed code {
|
||||
display: none !important;
|
||||
}
|
||||
5
src/css/pickr.css
Normal file
5
src/css/pickr.css
Normal file
File diff suppressed because one or more lines are too long
162
src/css/pluginCompatibility.css
Normal file
162
src/css/pluginCompatibility.css
Normal file
|
|
@ -0,0 +1,162 @@
|
|||
/** Execute Code Plugin */
|
||||
pre.code-styler-pre code ~ code.language-output {
|
||||
display: block;
|
||||
margin-bottom: 0;
|
||||
padding-bottom: calc(2.5 * var(--code-padding)) !important;
|
||||
padding-left: calc(var(--line-number-gutter-padding)) !important;
|
||||
border-top: var(--header-separator-width) solid var(--code-styler-header-separator-colour);
|
||||
}
|
||||
pre.code-styler-pre.code-styler-collapsed code ~ code.language-output {
|
||||
border-top-color: transparent;
|
||||
border-top-width: 0;
|
||||
}
|
||||
pre.code-styler-pre:hover code ~ code.language-output {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
pre.code-styler-pre code ~ code.language-output input.interactive-stdin {
|
||||
color: var(--text-normal);
|
||||
background-color: var(--code-styler-codeblock-background-colour);
|
||||
padding: 2px 8px;
|
||||
border-color: var(--code-comment);
|
||||
border-style: solid;
|
||||
border-radius: 5px;
|
||||
border-width: 1px;
|
||||
}
|
||||
pre.code-styler-pre code ~ code.language-output hr {
|
||||
display: none;
|
||||
}
|
||||
pre.code-styler-pre button.run-code-button {
|
||||
--copy-code-header-right-margin: 12px;
|
||||
--dent-difference: 24px;
|
||||
height: 14px;
|
||||
margin-bottom: 6px !important;
|
||||
}
|
||||
pre.code-styler-pre.code-styler-collapsed button.run-code-button {
|
||||
top: 500px;
|
||||
}
|
||||
pre.code-styler-pre button.run-code-button::before {
|
||||
content: "\200b";
|
||||
display: inline-block;
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
padding-right: 4px;
|
||||
background-color: var(--code-styler-button-colour);
|
||||
-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M7 28a1 1 0 0 1-1-1V5a1 1 0 0 1 1.482-.876l20 11a1 1 0 0 1 0 1.752l-20 11A1 1 0 0 1 7 28Z'/%3E%3Cpath fill='none' d='M0 0h32v32H0z' data-name='<Transparent Rectangle>'/%3E%3C/svg%3E");
|
||||
-webkit-mask-repeat: no-repeat;
|
||||
mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M7 28a1 1 0 0 1-1-1V5a1 1 0 0 1 1.482-.876l20 11a1 1 0 0 1 0 1.752l-20 11A1 1 0 0 1 7 28Z'/%3E%3Cpath fill='none' d='M0 0h32v32H0z' data-name='<Transparent Rectangle>'/%3E%3C/svg%3E");
|
||||
mask-repeat: no-repeat;
|
||||
vertical-align: 0px;
|
||||
}
|
||||
pre.code-styler-pre button.clear-button-disabled,
|
||||
pre.code-styler-pre button.run-button-disabled {
|
||||
display: none !important;
|
||||
}
|
||||
pre.code-styler-pre button.clear-button {
|
||||
height: 14px;
|
||||
margin-bottom: 6px !important;
|
||||
margin-left: calc(var(--language-border-width) + 12px);
|
||||
will-change: margin-right, clip-path;
|
||||
clip-path: var(--polygon-in);
|
||||
}
|
||||
pre.code-styler-pre button.clear-button::before {
|
||||
content: "\200b";
|
||||
display: inline-block;
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
padding-right: 4px;
|
||||
background-color: var(--code-styler-button-colour);
|
||||
-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M16 4 6 14l1.41 1.41L15 7.83V28h2V7.83l7.59 7.58L26 14 16 4z'/%3E%3Cpath fill='none' d='M0 0h32v32H0z' data-name='<Transparent Rectangle>'/%3E%3C/svg%3E");
|
||||
-webkit-mask-repeat: no-repeat;
|
||||
mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M16 4 6 14l1.41 1.41L15 7.83V28h2V7.83l7.59 7.58L26 14 16 4z'/%3E%3Cpath fill='none' d='M0 0h32v32H0z' data-name='<Transparent Rectangle>'/%3E%3C/svg%3E");
|
||||
mask-repeat: no-repeat;
|
||||
vertical-align: 0px;
|
||||
}
|
||||
pre.code-styler-pre button.clear-button:not(:active) {
|
||||
animation: reverse-indent var(--duration-button);
|
||||
}
|
||||
pre.code-styler-pre button.clear-button:hover{
|
||||
background-color: transparent;
|
||||
animation: reverse-outdent var(--duration-button);
|
||||
margin-right: var(--copy-code-header-right-margin);
|
||||
clip-path: var(--polygon-out);
|
||||
}
|
||||
pre.code-styler-pre button.clear-button:active {
|
||||
scale: 0.95;
|
||||
transition: scale var(--duration-button) cubic-bezier(0.4, 0.14, 0.3, 1);
|
||||
}
|
||||
.code-styler-pre-parent.has-run-code-button .load-state-indicator {
|
||||
color: none;
|
||||
background: none;
|
||||
z-index: 10;
|
||||
}
|
||||
.code-styler-pre-parent.has-run-code-button .load-state-indicator::before {
|
||||
box-shadow: none;
|
||||
}
|
||||
.code-styler-pre-parent.has-run-code-button .load-state-indicator svg {
|
||||
color: var(--code-styler-button-colour);
|
||||
}
|
||||
.code-styler-pre-parent.has-run-code-button .load-state-indicator svg:hover {
|
||||
color: var(--code-styler-button-active-colour);
|
||||
}
|
||||
.code-styler-pre-parent.has-run-code-button .load-state-indicator.visible {
|
||||
transform: translateX(0);
|
||||
}
|
||||
|
||||
/** Embed Code Plugin */
|
||||
.block-language-preview pre.code-styler-pre code {
|
||||
white-space: unset;
|
||||
}
|
||||
pre.code-styler-pre span.code-block-line_num-wrap,
|
||||
pre.code-styler-pre div.code-block-highlight-wrap {
|
||||
display: none;
|
||||
}
|
||||
.markdown-source-view.mod-cm6 .cm-embed-block .code-styler-pre-parent + .edit-block-button::after {
|
||||
content: 'Edit Block';
|
||||
font-size: var(--font-ui-smaller);
|
||||
padding-left: 4px;
|
||||
}
|
||||
.markdown-source-view.mod-cm6 .cm-embed-block:not(:hover) .code-styler-pre-parent + .edit-block-button {
|
||||
visibility: hidden;
|
||||
opacity: 0
|
||||
}
|
||||
.markdown-source-view.mod-cm6 .cm-embed-block .code-styler-pre-parent + .edit-block-button {
|
||||
--copy-code-header-right-margin: calc(2.2 * var(--header-button-spacing));
|
||||
--dent-difference: 0px;
|
||||
--polygon-in: polygon(0 0, 18px 0, 18px 36px, 0 36px);
|
||||
transition: visibility var(--duration-button), opacity var(--duration-button);
|
||||
visibility: visible;
|
||||
opacity: 1;
|
||||
z-index: 10;
|
||||
transform: translateY(-50%);
|
||||
top: max(calc(0.5 * var(--container-height) * 1),calc(0.5 * var(--container-min-height) * 1));
|
||||
margin: 0;
|
||||
margin-right: calc(var(--copy-code-header-right-margin) - var(--dent-difference));
|
||||
will-change: margin-right, clip-path;
|
||||
clip-path: var(--polygon-in);
|
||||
padding: 0;
|
||||
}
|
||||
body:not(.code-styler-show-langicons-always):not(.code-styler-show-langnames-always) .cm-embed-block .code-styler-pre-parent:has( pre.code-styler-pre .code-styler-header-container) + .edit-block-button,
|
||||
body:not(.code-styler-show-langnames-always) .cm-embed-block .code-styler-pre-parent:not(:has( pre.code-styler-pre .code-styler-header-container-specific)):not(:has( pre.code-styler-pre .code-styler-header-container img.code-styler-icon)) + .edit-block-button,
|
||||
body .cm-embed-block .code-styler-pre-parent:has( pre.code-styler-pre:not([class*='language-']) .code-styler-header-container) + .edit-block-button { /*? Depending on header visibility */
|
||||
--copy-code-header-right-margin: 4px;
|
||||
top: calc(0.5 * var(--font-text-size) * 0.875 * var(--line-height-normal));
|
||||
}
|
||||
.markdown-source-view.mod-cm6 .cm-embed-block:hover .code-styler-pre-parent + .edit-block-button:hover {
|
||||
background: transparent;
|
||||
animation: reverse-outdent var(--duration-button);
|
||||
margin-right: var(--copy-code-header-right-margin);
|
||||
clip-path: var(--polygon-out);
|
||||
}
|
||||
.markdown-source-view.mod-cm6 .cm-embed-block:hover .code-styler-pre-parent + .edit-block-button:active {
|
||||
scale: 0.95;
|
||||
transition: scale var(--duration-button) cubic-bezier(0.4, 0.14, 0.3, 1);
|
||||
}
|
||||
|
||||
/** File Include Plugin */
|
||||
div.block-language-include pre.code-styler-pre button.copy-code-button {
|
||||
margin: 0;
|
||||
margin-right: calc(var(--copy-code-header-right-margin) - var(--dent-difference));
|
||||
}
|
||||
div.block-language-include pre.code-styler-pre button.copy-code-button:hover {
|
||||
margin-right: var(--copy-code-header-right-margin);
|
||||
}
|
||||
75
src/styles.css
Normal file
75
src/styles.css
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
/** Define CSS variables */
|
||||
@import "./css/codeblocks.css";
|
||||
@import "./css/inlineCode.css";
|
||||
@import "./css/pdfExport.css";
|
||||
@import "./css/pickr.css";
|
||||
@import "./css/pluginCompatibility.css";
|
||||
|
||||
body {
|
||||
/* Codeblock Body */
|
||||
--border-radius: 10px;
|
||||
--gradient-background-colour: transparent;
|
||||
--code-padding: 8px;
|
||||
--container-height: calc(var(--language-icon-size) + 2 * var(--header-inner-vertical-padding) * var(--header-font-size));
|
||||
--container-min-height: calc((var(--header-font-size) + 2 * var(--header-inner-vertical-padding) * var(--header-font-size)) * var(--line-height-normal));
|
||||
--language-border-colour: var(--code-styler-codeblock-background-colour);
|
||||
--language-border-width: 0px;
|
||||
|
||||
/* Header */
|
||||
--header-font-size: var(--code-size);
|
||||
--header-padding: 0px;
|
||||
--header-inner-vertical-padding: 0.3;
|
||||
--header-spacing: 15px;
|
||||
--header-button-spacing: 14px;
|
||||
--header-separator-width: 2px;
|
||||
--header-separator-width-padding: var(--header-separator-width);
|
||||
--code-styler-header-border: none;
|
||||
--collapsed-bottom-border: 0 solid transparent;
|
||||
--language-icon-size: 28px;
|
||||
--language-icon-filter: none;
|
||||
|
||||
/* Lines */
|
||||
--gradient-highlights-colour-stop: 100%;
|
||||
|
||||
/* Line Numbers */
|
||||
--line-number-height-correction: 2px;
|
||||
--line-number-gutter-padding: 16px;
|
||||
--line-number-gutter-min-width: 32.67px;
|
||||
|
||||
/* Line Text */
|
||||
--line-wrapping: pre-wrap;
|
||||
--line-active-wrapping: var(--line-wrapping);
|
||||
|
||||
/* Buttons */
|
||||
--code-styler-button-colour: var(--text-muted);
|
||||
--code-styler-button-active-colour: white;
|
||||
--duration-button: 240ms;
|
||||
--dent-difference: 30px;
|
||||
--polygon-in: polygon(0 0, 16px 0, 16px 36px, 0 36px);
|
||||
--polygon-out: polygon(0 0, 100% 0, 100% 100%, 0 100%);
|
||||
--copy-code-header-right-margin: calc(3 * var(--header-button-spacing));
|
||||
|
||||
/* Inline Code */
|
||||
--code-styler-inline-font-weight: 400;
|
||||
--code-styler-inline-border-radius: 6px;
|
||||
--code-styler-inline-padding-vertical: 5px;
|
||||
--code-styler-inline-padding-horizontal: 5px;
|
||||
--code-styler-inline-margin-horizontal: 0px;
|
||||
--code-styler-inline-colour: var(--code-normal);
|
||||
--code-styler-inline-colour-active: var(--code-normal);
|
||||
--code-styler-inline-background-colour: var(--code-background);
|
||||
}
|
||||
|
||||
/** Settings */
|
||||
.setting-item.code-styler-spaced .checkbox-container + .pickr {
|
||||
padding-left: 10px;
|
||||
}
|
||||
.code-styler-donation {
|
||||
width: 70%;
|
||||
margin: 0 auto;
|
||||
text-align: center;
|
||||
}
|
||||
.code-styler-setting-text-area textarea {
|
||||
width: 400px;
|
||||
height: 220px;
|
||||
}
|
||||
1542
styles.css
1542
styles.css
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue