Skip to content

Commit

Permalink
tweak display of code in headings (#6103)
Browse files Browse the repository at this point in the history
* tweak display of code in headings
  • Loading branch information
jharrell authored Jun 14, 2024
1 parent dc65c3c commit f8b5f64
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 71 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ The availability of advanced `Json` filtering depends on your Prisma version:

</Admonition>

### <inlinecode>path</inlinecode> 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:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
41 changes: 6 additions & 35 deletions src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -319,10 +314,6 @@ h6 {
font-weight: 500;
}

h1.inline-code {
display: inline-block;
}

h2 {
margin: 0;
margin-block-end: 0;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -488,10 +471,6 @@ blockquote::before {
border-radius: 5px;
}

blockquote code {
color: var(--code-inner-color);
}

blockquote p {
margin: 0;
}
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -1576,4 +1547,4 @@ h2 code {
border-color: #c3dafe;
color: #c3dafe;
}
}
}
37 changes: 5 additions & 32 deletions src/css/prism.css
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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,
Expand Down Expand Up @@ -192,4 +165,4 @@ inlinecode {

.token.annotation {
color: var(--code-token3-color) !important;
}
}
13 changes: 11 additions & 2 deletions src/css/theming.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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"] {
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -464,4 +473,4 @@ html[data-theme="dark"] {
--main-bgd-color: #1a202c;
--border-color: #2d3748;
--white-color: white;
}
}

0 comments on commit f8b5f64

Please sign in to comment.