File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change 99 getCodeColors ,
1010 getColor ,
1111 ColorName ,
12+ getColorScheme
1213} from "@code-hike/utils"
1314import {
1415 useStepParser ,
@@ -146,6 +147,7 @@ function AfterDimensions({
146147 opacity : 1 ,
147148 backgroundColor : bg ,
148149 color : fg ,
150+ [ "color-scheme" as any ] : getColorScheme ( theme ) ,
149151 [ "--ch-selection-background" as any ] : getColor (
150152 theme ,
151153 ColorName . SelectionBackground
Original file line number Diff line number Diff line change @@ -203,6 +203,16 @@ export function getColor(
203203 }
204204}
205205
206+ export function getColorScheme ( theme : EditorTheme ) : string | undefined {
207+ const themeType = getThemeType ( theme )
208+ if ( themeType === "dark" ) {
209+ return "dark"
210+ } else if ( themeType === "light" ) {
211+ return "light"
212+ }
213+ return undefined
214+ }
215+
206216export function transparent (
207217 color : Color ,
208218 opacity : number
You can’t perform that action at this time.
0 commit comments