From f8b5f6403504884c850418aa1ef060dccfaaf7e1 Mon Sep 17 00:00:00 2001 From: Jon Harrell <4829245+jharrell@users.noreply.github.com> Date: Fri, 14 Jun 2024 11:03:17 -0500 Subject: [PATCH] tweak display of code in headings (#6103) * tweak display of code in headings --- .../100-working-with-json-fields.mdx | 2 +- .../700-netlify-caching-issue.mdx | 2 +- src/css/custom.css | 41 +++---------------- src/css/prism.css | 37 +++-------------- src/css/theming.css | 13 +++++- 5 files changed, 24 insertions(+), 71 deletions(-) diff --git a/content/200-orm/200-prisma-client/200-special-fields-and-types/100-working-with-json-fields.mdx b/content/200-orm/200-prisma-client/200-special-fields-and-types/100-working-with-json-fields.mdx index 63b16beea7..b24e361f48 100644 --- a/content/200-orm/200-prisma-client/200-special-fields-and-types/100-working-with-json-fields.mdx +++ b/content/200-orm/200-prisma-client/200-special-fields-and-types/100-working-with-json-fields.mdx @@ -165,7 +165,7 @@ The availability of advanced `Json` filtering depends on your Prisma version: -### path syntax depending on database +### `path` syntax depending on database The filters below use a `path` option to select specific parts of the `Json` value to filter on. The implementation of that filtering differs between connectors: diff --git a/content/200-orm/800-more/600-help-and-troubleshooting/100-help-articles/700-netlify-caching-issue.mdx b/content/200-orm/800-more/600-help-and-troubleshooting/100-help-articles/700-netlify-caching-issue.mdx index 8526b608bb..41971278c9 100644 --- a/content/200-orm/800-more/600-help-and-troubleshooting/100-help-articles/700-netlify-caching-issue.mdx +++ b/content/200-orm/800-more/600-help-and-troubleshooting/100-help-articles/700-netlify-caching-issue.mdx @@ -8,7 +8,7 @@ metaDescription: 'Learn to configure your build process on Netlify to avoid cach ## Problem -If you deploy an application using Prisma ORM to [Netlify](https://netlify.com/), you may run into the following error message on deployment: +If you deploy an application using Prisma ORM to [Netlify](https://www.netlify.com/), you may run into the following error message on deployment: ``` Prisma has detected that this project was built on Netlify, which caches dependencies. diff --git a/src/css/custom.css b/src/css/custom.css index 526868ae2b..c966dfd8bf 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -56,11 +56,6 @@ main { display: none; } -code { - border: none !important; - padding: 0.05em 0.3em 0.2em; -} - pre { background-color: var(--code-bg) !important; color: var(--gray-500) !important; @@ -319,10 +314,6 @@ h6 { font-weight: 500; } -h1.inline-code { - display: inline-block; -} - h2 { margin: 0; margin-block-end: 0; @@ -357,14 +348,6 @@ h6:hover .title-link { opacity: 1; } -h2 code, -h3 code, -h4 code, -h5 code, -h6 code { - font-size: inherit; -} - * { box-sizing: border-box; -webkit-font-smoothing: antialiased; @@ -488,10 +471,6 @@ blockquote::before { border-radius: 5px; } -blockquote code { - color: var(--code-inner-color); -} - blockquote p { margin: 0; } @@ -1382,23 +1361,15 @@ article h6 { margin-left: var(--ifm-pre-padding); } -h2 code { - font-size: revert !important; +code { + font-variant: no-common-ligatures no-discretionary-ligatures no-historical-ligatures no-contextual; + vertical-align: baseline; + border: none !important; } .anchor code { - background: var(--code-inline-bgd-color); - border-radius: 5px; - color: var(--main-font-color); + font-size: inherit; display: inline-block; - font-family: JetBrainsMono; - font-size: 14px; - font-style: normal; - font-variant: no-common-ligatures no-discretionary-ligatures no-historical-ligatures no-contextual; - line-height: 24px; - padding: 0.05em 0.3em 0.2em; - vertical-align: baseline; - transform: translateY(-2px); } .videoWrapper { @@ -1576,4 +1547,4 @@ h2 code { border-color: #c3dafe; color: #c3dafe; } -} +} \ No newline at end of file diff --git a/src/css/prism.css b/src/css/prism.css index a17eb5d3bf..f4f00fb984 100644 --- a/src/css/prism.css +++ b/src/css/prism.css @@ -48,6 +48,7 @@ pre[class*="language-"].is-terminal ::selection { } @media (prefers-color-scheme: dark) { + code[class*="language-"].is-terminal, pre[class*="language-"].is-terminal, pre[class*="language-"].is-terminal code { @@ -71,54 +72,26 @@ pre[class*="language-"] { overflow: auto; } -pre[class*="language-"] > code { +pre[class*="language-"]>code { padding-bottom: 1em; } -:not(pre) > code[class*="language-"], +:not(pre)>code[class*="language-"], pre[class*="language-"] { background: var(--code-bgd-color) !important; } /* Inline code */ -:not(pre) > code[class*="language-"] { +:not(pre)>code[class*="language-"] { padding: 0.1em; border-radius: 0.3em; white-space: normal; } -code.inline-code, -.inline-code, -inlinecode { - display: inline; - vertical-align: baseline; - padding: 0.05em 0.3em 0.2em 0.3em; - background: var(--code-inline-bgd-color); - font-size: 14px; - font-feature-settings: - "clig" 0, - "calt" 0; - font-variant: no-common-ligatures no-discretionary-ligatures no-historical-ligatures no-contextual; - font-family: "JetBrainsMono"; - font-style: normal; - line-height: 24px; - border-radius: 5px; - color: var(--main-font-color); - font-weight: 500; -} - -inlinecode { - font-size: inherit; -} - .inline-code { background-color: var(--border-color); } -.top-section h1 inlinecode { - font-size: 2rem; -} - .token.comment, .token.prolog, .token.doctype, @@ -192,4 +165,4 @@ inlinecode { .token.annotation { color: var(--code-token3-color) !important; -} +} \ No newline at end of file diff --git a/src/css/theming.css b/src/css/theming.css index 698b03984b..183d967593 100644 --- a/src/css/theming.css +++ b/src/css/theming.css @@ -3,6 +3,7 @@ .details_node_modules-\@docusaurus-theme-classic-lib-theme-Details-styles-module { --docusaurus-details-decoration-color: transparent !important; } + :root { --docsearch-modal-width: 1248px; --ifm-color-primary: #2e8555; @@ -13,6 +14,9 @@ --ifm-color-primary-lighter: #359962; --ifm-color-primary-lightest: #3cad6e; --ifm-code-font-size: 14px; + --ifm-code-background: #edf2f7; + --ifm-code-padding-horizontal: 0.3rem; + --ifm-font-family-monospace: "JetBrainsMono"; --ifm-menu-link-sublist-icon: url("/icons/triangle-right.svg"); --ifm-breadcrumb-separator: url("/icons/breadcrumb.svg"); --navbar-teal-color: rgb(24, 115, 103); @@ -43,7 +47,7 @@ --ifm-toc-padding-horizontal: 1rem; --docusaurus-details-decoration-color: transparent; --ifm-table-stripe-background: transparent; - --ifm-code-background: #edf2f7; + --ifm-btn-border-color-active: #718096; --ifm-btn-border-color: #e2e8f0; @@ -140,16 +144,19 @@ --gray-800: #2d3748; --gray-900: #1a202c; --gray-1000: #090a15; + @media (max-width: 996px) { --ifm-menu-link-sublist-icon: url("/icons/chevron-up-solid.svg"); --ifm-navbar-padding-horizontal: 0; } } + :root[data-theme="light"] { --docusaurus-added-code-line-bg: rgba(71, 187, 120, 0.1); --docusaurus-deleted-code-line-bg: rgba(229, 62, 62, 0.1); --docusaurus-edited-code-line-bg: rgba(10, 104, 255, 0.2); } + /* For readability concerns, you should choose a lighter palette in dark mode. */ /* PRIMITES WITH THEME DEFINED BY TOGGLER */ html[data-theme="dark"] { @@ -243,6 +250,7 @@ html[data-theme="dark"] { /* PRIMITES WITH THEME DEFINED */ @media (prefers-color-scheme: dark) { + /* Theme: Dark OS + Light docs = Light docs */ :root[data-theme="light"] { --ifm-color-primary: #2e8555; @@ -369,6 +377,7 @@ html[data-theme="dark"] { --gray-900: #1a202c; --gray-1000: #090a15; } + :root[data-theme="dark"] { --ifm-color-primary: #25c2a0; --ifm-color-primary-dark: #21af90; @@ -464,4 +473,4 @@ html[data-theme="dark"] { --main-bgd-color: #1a202c; --border-color: #2d3748; --white-color: white; -} +} \ No newline at end of file