1+ /* SPDX-License-Identifier: EUPL-1.2 */
2+ /* Copyright (C) 2025 Dimpact */
3+ /* *
4+ * Light/default theme implementation.
5+ *
6+ * Use this as:
7+ *
8+ * @use './themes/light' as light-theme;
9+ *
10+ * @include light-theme.styles;
11+ */
12+
13+ /* *
14+ * Define the CSS properties overriding default admin theme.
15+ *
16+ * @todo - check if the !important's are still needed?
17+ *
18+ * See `admin/static/admin/css/base.css` for a reference of available variables.
19+ */
20+ @mixin variables {
21+ --primary : #04a5bb !important ;
22+ --accent : #f3f3f3 ;
23+ --secondary : #04a5bb !important ;
24+ --primary-fg : #fff ;
25+
26+ --header-color : #fff ;
27+
28+ --breadcrumbs-fg : #04a5bb ;
29+ --breadcrumbs-link-fg : var (--body-fg );
30+ --breadcrumbs-link-hover : #000 ; // not in the core django vars
31+ --breadcrumbs-bg : #f3f3f3 ;
32+
33+ --link-fg : #017092 ;
34+ --link-hover-color : #051f31 ;
35+ --link-selected-fg : #5b80b2 ;
36+
37+ // #748 client requested increased contrast for form-row borders
38+ // here we override a django admin style
39+ --hairline-color : #e5e5e5 ;
40+
41+ // --button-bg: var(--primary);
42+ --button-fg : #fff ;
43+ --button-hover-bg : #017092 ;
44+ --default-button-bg : #017092 ;
45+ --default-button-hover-bg : #000 ;
46+ --close-button-bg : #888 ;
47+ --close-button-hover-bg : #333 ;
48+
49+ --object-tools-bg : #888 ;
50+ --object-tools-hover-bg : #333 ;
51+ }
52+
53+ @mixin djai-variables {
54+ --djai-tab-bg : var (--primary ); // no fallback to default admin vars
55+ --djai-tab-bg--active : var (--breadcrumbs-bg );
56+ --djai-tab-bg--hover : #017092 ;
57+ --djai-tab-fg--active : var (--secondary );
58+ --djai-dropdown-bg--active : #017092 ;
59+ --djai-dropdown-bg--hover : #017092 ;
60+
61+ // custom properties
62+ --oz-djai-border-bottom-width : 8px ;
63+ --oz-djai-border-bottom-color : #f3f3f3 ;
64+ }
65+
66+ /* *
67+ * Aggregate the bits and pieces to define the light theme style rules.
68+ *
69+ * The light theme styles are not guarded by a media query to make sure they're the
70+ * default that is applied.
71+ */
72+ @mixin styles {
73+
74+ html [data-theme = ' light' ],
75+ :root {
76+ @include variables ;
77+ }
78+
79+ // generic selector to be more specific than the library itself, but less specific
80+ // than the dark theme styles
81+ body {
82+ @include djai-variables ;
83+ }
84+ }
0 commit comments