From 3e293535e3cde2c7db2bbc3e8fb7de2b726ce2b3 Mon Sep 17 00:00:00 2001 From: hawkgs Date: Wed, 23 Apr 2025 17:13:59 +0300 Subject: [PATCH] docs(docs-infra): use a custom scrollbar for the examples using HighlightTypeScript (#60981) The examples used to render the native scrollbar. PR Close #60981 --- .../pipeline/api-gen/rendering/templates/highlight-ts.tsx | 5 +++-- .../pipeline/api-gen/rendering/templates/raw-html.tsx | 4 ++-- adev/shared-docs/styles/_colors.scss | 2 ++ adev/shared-docs/styles/_reference.scss | 5 +---- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/adev/shared-docs/pipeline/api-gen/rendering/templates/highlight-ts.tsx b/adev/shared-docs/pipeline/api-gen/rendering/templates/highlight-ts.tsx index ff8a72f03f7..90caa68e537 100644 --- a/adev/shared-docs/pipeline/api-gen/rendering/templates/highlight-ts.tsx +++ b/adev/shared-docs/pipeline/api-gen/rendering/templates/highlight-ts.tsx @@ -11,8 +11,9 @@ import {RawHtml} from './raw-html'; import {codeToHtml} from '../shiki/shiki'; /** Component to render a header of the CLI page. */ -export function HighlightTypeScript(props: {code: string; }) { +export function HighlightTypeScript(props: {code: string}) { const result = codeToHtml(props.code, 'typescript'); + const withScrollTrack = result.replace(/^(