File tree Expand file tree Collapse file tree 4 files changed +8
-8
lines changed
pipeline/api-gen/rendering/templates Expand file tree Collapse file tree 4 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -11,8 +11,9 @@ import {RawHtml} from './raw-html';
1111import { codeToHtml } from '../shiki/shiki' ;
1212
1313/** Component to render a header of the CLI page. */
14- export function HighlightTypeScript ( props : { code : string ; } ) {
14+ export function HighlightTypeScript ( props : { code : string } ) {
1515 const result = codeToHtml ( props . code , 'typescript' ) ;
16+ const withScrollTrack = result . replace ( / ^ ( < p r e c l a s s = " s h i k i ) / , '$1 docs-mini-scroll-track' ) ;
1617
17- return < RawHtml value = { result } /> ;
18+ return < RawHtml value = { withScrollTrack } /> ;
1819}
Original file line number Diff line number Diff line change 99import { h } from 'preact' ;
1010
1111/** Convenience component to render raw html */
12- export function RawHtml ( props : { value : string , className ?: string } ) {
12+ export function RawHtml ( props : { value : string ; className ?: string } ) {
1313 // Unfortunately, there does not seem to be a way to render the raw html
1414 // into a text node without introducing a div.
15- return < div className = { props . className } dangerouslySetInnerHTML = { ( { __html : props . value } ) } > </ div > ;
15+ return < div className = { props . className } dangerouslySetInnerHTML = { { __html : props . value } } > </ div > ;
1616}
Original file line number Diff line number Diff line change 290290// LIGHT MODE (Explicit)
291291.docs-light-mode {
292292 background-color : #ffffff ;
293+ color-scheme : light ;
293294 @include root-definitions ();
294295 .docs-invert-mode {
295296 @include dark-mode-definitions ();
299300// DARK MODE (Explicit)
300301.docs-dark-mode {
301302 background-color : oklch (16.93% 0.004 285.95 );
303+ color-scheme : dark ;
302304 @include root-definitions ();
303305 @include dark-mode-definitions ();
304306 .docs-invert-mode {
Original file line number Diff line number Diff line change 140140
141141 code {
142142 font-size : 0.875rem ;
143+ overflow : hidden ;
143144
144145 & :has (pre ) {
145146 padding : 0 ;
146147 }
147-
148- & :not (pre * ) {
149- padding : 0 0.3rem ;
150- }
151148 }
152149
153150 pre {
You can’t perform that action at this time.
0 commit comments