Skip to content
Open
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@base-ui/utils": "workspace:*",
"@mdx-js/loader": "^3.1.1",
"@mdx-js/react": "^3.1.1",
"@mui/internal-docs-infra": "0.9.1-canary.0",
"@mui/internal-docs-infra": "0.10.1-canary.1",
"@next/mdx": "^16.1.6",
"@react-spring/web": "^10.0.3",
"@stefanprobst/rehype-extract-toc": "^3.0.0",
Expand Down
3 changes: 3 additions & 0 deletions docs/src/css/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@
--color-selection: oklch(80% 28% 264deg / 50%);
--color-line-highlight: oklch(80% 28% 264deg / 20%);
--color-line-highlight-strong: oklch(80% 28% 264deg / 35%);
--color-line-highlight-strong-mark: oklch(80% 28% 264deg / 50%);

/* Syntax highlighting */
--color-gray: var(--color-gray-600);
Expand Down Expand Up @@ -317,6 +318,7 @@
--color-selection: oklch(50% 50% 264deg / 40%);
--color-line-highlight: oklch(50% 50% 264deg / 20%);
--color-line-highlight-strong: oklch(50% 50% 264deg / 35%);
--color-line-highlight-strong-mark: oklch(50% 50% 264deg / 50%);

/* Syntax highlighting */
--color-gray: var(--color-gray-600);
Expand Down Expand Up @@ -394,6 +396,7 @@
--color-highlight: initial;
--color-line-highlight: initial;
--color-line-highlight-strong: initial;
--color-line-highlight-strong-mark: initial;

--color-gray: initial;
--color-navy: initial;
Expand Down
27 changes: 19 additions & 8 deletions docs/src/css/syntax.css
Original file line number Diff line number Diff line change
Expand Up @@ -254,28 +254,39 @@
--color-docs-infra-syntax-nullish: var(--color-blue);
}

/* Frame highlighting */
pre .frame[data-frame-type='highlighted'],
pre .frame[data-frame-type='highlighted-unfocused'] {
background-color: var(--color-line-highlight);
}

/* Line highlighting */
pre [data-hl] {
pre .line[data-hl] {
background-color: var(--color-line-highlight);
}

pre [data-hl='strong'] {
pre .line[data-hl='strong'] {
background-color: var(--color-line-highlight-strong);
}

/* Word highlighting */
pre [data-hl]:not(.line) {
/* Mark (text) highlighting */
pre mark {
display: inline-flex;
background-color: var(--color-line-highlight);
color: var(--color-blue);
}

/* Make highlighted words blue */
pre [data-hl]:not(.line),
pre [data-hl]:not(.line) > * {
pre mark > * {
color: var(--color-blue);
}

/* Stronger emphasis for highlighted words inside already highlighted lines */
pre .line[data-hl] [data-hl]:not(.line) {
pre mark[data-hl] {
background-color: var(--color-line-highlight-strong);
}

/* Inside a strong highlighted line, mark steps up further */
pre mark[data-hl='strong'] {
background-color: var(--color-line-highlight-strong-mark);
}
}
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading