Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
feat(share): style inline code like the app
Elian Doran672cd30fe1a9
diff --git a/packages/share-theme/src/base.css b/packages/share-theme/src/base.cssindex 29939386f0..311ffbb9ff 100644--- a/packages/share-theme/src/base.css+++ b/packages/share-theme/src/base.css@@ -30,8 +30,9 @@ html.theme-light {--link-hover-background: #3c7fa017;--link-focus-outline-color: #00000063;--text-menu-active: var(--background-secondary);- /* The code block shadow of `theme-next-light.css`. */+ /* The code colors of `theme-next-light.css`. */--code-block-box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.1), 0px 0px 2px rgba(0, 0, 0, 0.2);+ --inline-code-background-color: rgba(0, 0, 0, 0.05);/* The tree item colors of `theme-next-light.css`. */--tree-item-hover-background: rgba(0, 0, 0, 0.032);--tree-item-active-background: #FFFFFF;@@ -70,8 +71,9 @@ html.theme-dark {--link-hover-background: #75c2e324;--link-focus-outline-color: #ffffff57;--text-menu-active: var(--background-secondary);- /* The code block shadow of `theme-next-dark.css`. */+ /* The code colors of `theme-next-dark.css`. */--code-block-box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);+ --inline-code-background-color: rgba(255, 255, 255, 0.08);/* The tree item colors of `theme-next-dark.css`. */--tree-item-hover-background: #ffffff0d;--tree-item-active-background: #ffffff25;diff --git a/packages/share-theme/src/content/content.css b/packages/share-theme/src/content/content.cssindex 906daa8994..f194971542 100644--- a/packages/share-theme/src/content/content.css+++ b/packages/share-theme/src/content/content.css@@ -22,12 +22,12 @@ iframe.pdf-view {height: 800px;}+/* The inline code of the app, `style.css`. */.ck-content code:not(pre code) {- color: var(--text-primary);- background-color: var(--background-secondary);- border: 1px solid var(--background-active);- border-radius: 6px;- padding: 2px 5px;+ padding: 0.1em 0.35em;+ border-radius: 5px;+ background-color: var(--inline-code-background-color);+ font-size: 0.8em;overflow-wrap: break-word;}