Skip to content

Commit d2ef247

Browse files
authored
Support both curl and bash code tab highlight (#1195)
1 parent d056235 commit d2ef247

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

packages/docusaurus-theme-openapi-docs/src/theme/ApiExplorer/CodeTabs/_CodeTabs.scss

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,11 @@ body[class="ReactModal__Body--open"] {
197197
}
198198

199199
&.active {
200-
box-shadow: 0 0 0 3px var(--openapi-code-tab-shadow-color-curl);
200+
box-shadow: 0 0 0 3px
201+
var(
202+
--openapi-code-tab-shadow-color-curl,
203+
var(--openapi-code-tab-shadow-color-bash)
204+
);
201205
border-color: var(--ifm-color-danger);
202206
}
203207
}

packages/docusaurus-theme-openapi-docs/src/theme/styles.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@
6767
--openapi-code-tab-border-color-java: #0374bd;
6868
--openapi-code-tab-border-color-powershell: #00adef;
6969
--openapi-code-tab-shadow-color-python: rgba(255, 219, 80, 0.25);
70+
--openapi-code-tab-shadow-color-curl: var(
71+
--openapi-code-tab-shadow-color-bash
72+
);
7073
--openapi-code-tab-shadow-color-bash: rgba(250, 56, 62, 0.25);
7174
--openapi-code-tab-shadow-color-go: rgba(84, 199, 236, 0.25);
7275
--openapi-code-tab-shadow-color-js: rgba(255, 186, 0, 0.25);

0 commit comments

Comments
 (0)