Skip to content

Commit ab7d47c

Browse files
authored
feat: allow styling header and selected tab color (#120)
1 parent 0fa9219 commit ab7d47c

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

docs/docs/api/styling.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ The following custom CSS properties are available:
1212
| `--ave-button-active-background` | Color of the `:focus` and `:hover` button |
1313
| `--ave-button-background` | Background of the button (code snippet, events) |
1414
| `--ave-button-color` | Color of the button (code snippet, events) |
15+
| `--ave-header-background` | Background of the header used for tag name |
1516
| `--ave-header-color` | Header text color used for tag name |
1617
| `--ave-item-color` | API items content color (main text) |
1718
| `--ave-label-color` | API items labels color |
@@ -20,6 +21,7 @@ The following custom CSS properties are available:
2021
| `--ave-monospace-font` | Monospace font stack for the API items |
2122
| `--ave-primary-color` | Primary color, used for header and active tab |
2223
| `--ave-tab-color` | Inactive tabs color |
24+
| `--ave-tab-selected-color` | Selected tab color |
2325
| `--ave-tab-indicator-size` | Size of the selected tab indicator |
2426

2527
## CSS shadow parts

src/api-viewer-tab.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export class ApiViewerTab extends LitElement {
5353
}
5454
5555
:host([selected]) {
56-
color: var(--ave-primary-color);
56+
color: var(--ave-tab-selected-color, var(--ave-primary-color));
5757
}
5858
5959
:host([selected])::before {

src/styles/shared-styles.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export default css`
3838
align-items: center;
3939
justify-content: space-between;
4040
padding: 0.75rem;
41-
background: var(--ave-primary-color);
41+
background: var(--ave-header-background, var(--ave-primary-color));
4242
border-top-left-radius: var(--ave-border-radius);
4343
border-top-right-radius: var(--ave-border-radius);
4444
}

0 commit comments

Comments
 (0)