|
| 1 | +--- |
| 2 | +title: Theme System Overview & New Variables |
| 3 | +audience: Technical |
| 4 | +created_by: Junjie Quan |
| 5 | +created_on: 2025/12/05 |
| 6 | +--- |
| 7 | + |
| 8 | +# Theme System Overview |
| 9 | + |
| 10 | +The SciCat front-end uses a **CSS variable–based theming system**. |
| 11 | +All configurable visual properties—colors, and component-specific styles—are exposed as `--theme-*` variables. |
| 12 | + |
| 13 | +This allows deployments to adjust appearance without touching source code. |
| 14 | +The application reads these variables directly in SCSS using standard var() usage: |
| 15 | + |
| 16 | +```scss |
| 17 | +color: var(--theme-header-1-default); |
| 18 | +border: var(--theme-table-border); |
| 19 | +box-shadow: var(--theme-table-shadow); |
| 20 | +``` |
| 21 | + |
| 22 | +# Variable Details |
| 23 | + |
| 24 | +`--theme-primary-default` |
| 25 | + |
| 26 | +`--theme-primary-default-contrast` |
| 27 | + |
| 28 | +… Above variables control general old theme colors (modify as needed) |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | +# Newly Added Variables |
| 33 | + |
| 34 | +### Date: 2025-12-05 |
| 35 | + |
| 36 | +```scss |
| 37 | +--theme-side-panel-border |
| 38 | +--theme-side-panel-shadow |
| 39 | +--theme-table-border |
| 40 | +--theme-table-shadow |
| 41 | +``` |
| 42 | +⚠️ _NOTE: The 4 variables are currently implemented only on the Datasets and Proposals pages._ |
| 43 | + |
| 44 | +`--theme-side-panel-border`: |
| 45 | +Controls the border around the collapsible side panel. |
| 46 | +- Default: none |
| 47 | +- Component-level fallback: |
| 48 | + - 1px solid rgba(153, 213, 233, 0.7) (provided through var(--theme-table-border, fallback) in SCSS) |
| 49 | +- Set to none to remove the border completely. |
| 50 | + |
| 51 | +`--theme-side-panel-shadow`: |
| 52 | +Controls the shadow applied to the side panel. |
| 53 | +- Default: Material-like elevation shadow |
| 54 | + - 0px 2px 1px -1px rgba(0, 0, 0, 0.20), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12)` |
| 55 | +- Set to none to disable shadows. |
| 56 | + |
| 57 | +`--theme-table-border`: |
| 58 | +Controls the border around the table container. |
| 59 | +- Default: none |
| 60 | +- Component-level fallback: |
| 61 | + - 1px solid rgba(153, 213, 233, 0.7) (provided through var(--theme-table-border, fallback) in SCSS) |
| 62 | +- Set to none to remove the border completely. |
| 63 | + |
| 64 | +`--theme-table-shadow`: |
| 65 | +Controls the shadow applied to the table container. |
| 66 | +- Default: Material-like elevation shadow |
| 67 | + - 0px 2px 1px -1px rgba(0, 0, 0, 0.20), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12)` |
| 68 | +- Set to none to disable shadows. |
0 commit comments