/
_root.scss
204 lines (191 loc) · 9.52 KB
/
_root.scss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
//
// Global CSS Variables
//
:root {
// General
--typo3-font-family-sans-serif: #{$font-family-sans-serif};
--typo3-font-family-monospace: #{$font-family-monospace};
--typo3-font-family: var(--typo3-font-family-sans-serif);
--typo3-font-family-code: var(--typo3-font-family-monospace);
--typo3-spacing: 1rem;
--typo3-color-scheme: auto;
// Header
--typo3-header-font-family: "Source Sans 3", sans-serif;
// Light
--typo3-light-color-scheme: light;
--typo3-light-color: #{$body-color};
--typo3-light-primary-color: #{$primary};
--typo3-light-secondary-color: #{tint-color($body-color, 40%)};
--typo3-light-bg: #{$white};
--typo3-light-border-color: #{$gray-300};
--typo3-light-link-color: #{$primary};
--typo3-light-link-hover-color: #{tint-color($primary, 10%)};
--typo3-light-hover-color: var(--typo3-light-color);
--typo3-light-hover-bg: #{tint-color($primary, 95%)};
--typo3-light-hover-border-color: #{tint-color($primary, 85%)};
--typo3-light-focus-color: var(--typo3-light-color);
--typo3-light-focus-bg: #{tint-color($primary, 95%)};
--typo3-light-focus-border-color: #{tint-color($primary, 20%)};
--typo3-light-active-color: #{$white};
--typo3-light-active-bg: #{tint-color($primary, 20%)};
--typo3-light-active-border-color: #{tint-color($primary, 20%)};
--typo3-light-disabled-color: #{$gray-600};
--typo3-light-disabled-bg: transparent;
--typo3-light-disabled-border-color: transparent;
// Dark
--typo3-dark-color-scheme: dark;
--typo3-dark-color: #{$white};
--typo3-dark-primary-color: #{tint-color($primary, 40%)};
--typo3-dark-secondary-color: #{shade-color($white, 40%)};
--typo3-dark-bg: #{$gray-900};
--typo3-dark-border-color: #{$gray-800};
--typo3-dark-link-color: #{tint-color($primary, 40%)};
--typo3-dark-link-hover-color: #{tint-color($primary, 50%)};
--typo3-dark-hover-color: var(--typo3-dark-color);
--typo3-dark-hover-bg: #{$gray-800};
--typo3-dark-hover-border-color: #{$gray-700};
--typo3-dark-focus-color: var(--typo3-dark-color);
--typo3-dark-focus-bg: #{shade-color($primary, 50%)};
--typo3-dark-focus-border-color: #{shade-color($primary, 40%)};
--typo3-dark-active-color: #{$white};
--typo3-dark-active-bg: #{shade-color($primary, 15%)};
--typo3-dark-active-border-color: #{shade-color($primary, 20%)};
--typo3-dark-disabled-color: #{$gray-600};
--typo3-dark-disabled-bg: transparent;
--typo3-dark-disabled-border-color: transparent;
// Component
--typo3-component-color-scheme: var(--typo3-light-color-scheme);
--typo3-component-color: var(--typo3-light-color);
--typo3-component-primary-color: var(--typo3-light-primary-color);
--typo3-component-secondary-color: var(--typo3-light-secondary-color);
--typo3-component-bg: var(--typo3-light-bg);
--typo3-component-link-color: var(--typo3-light-link-color);
--typo3-component-link-hover-color: var(--typo3-light-link-hover-color);
--typo3-component-font-size: #{$font-size-base};
--typo3-component-line-height: #{$line-height-base};
--typo3-component-border-radius: 4px;
--typo3-component-border-width: 1px;
--typo3-component-border-color: var(--typo3-light-border-color);
--typo3-component-padding-y: .75rem;
--typo3-component-padding-x: 1rem;
--typo3-component-box-shadow: 0 1px 2px rgba(0, 0, 0, .25);
--typo3-component-box-shadow-strong: 0 2px 4px rgba(0, 0, 0, .5);
--typo3-component-hover-color: var(--typo3-light-hover-color);
--typo3-component-hover-bg: var(--typo3-light-hover-bg);
--typo3-component-hover-border-color: var(--typo3-light-hover-border-color);
--typo3-component-focus-color: var(--typo3-light-focus-color);
--typo3-component-focus-bg: var(--typo3-light-focus-bg);
--typo3-component-focus-border-color: var(--typo3-light-focus-border-color);
--typo3-component-active-color: var(--typo3-light-active-color);
--typo3-component-active-bg: var(--typo3-light-active-bg);
--typo3-component-active-border-color: var(--typo3-light-active-border-color);
--typo3-component-disabled-color: var(--typo3-light-disabled-color);
--typo3-component-disabled-bg: var(--typo3-light-disabled-bg);
--typo3-component-disabled-border-color: var(--typo3-light-disabled-border-color);
--typo3-component-spacing: 2rem;
// List
--typo3-list-item-padding-y: .5rem;
--typo3-list-item-padding-x: .75rem;
--typo3-list-item-hover-color: var(--typo3-component-hover-color);
--typo3-list-item-hover-bg: var(--typo3-component-hover-bg);
--typo3-list-item-hover-border-color: var(--typo3-component-hover-border-color);
--typo3-list-item-focus-color: var(--typo3-component-focus-color);
--typo3-list-item-focus-bg: var(--typo3-component-focus-bg);
--typo3-list-item-focus-border-color: var(--typo3-component-focus-border-color);
--typo3-list-item-active-color: var(--typo3-list-item-focus-color);
--typo3-list-item-active-bg: var(--typo3-list-item-focus-bg);
--typo3-list-item-active-border-color: var(--typo3-list-item-focus-border-color);
--typo3-list-item-disabled-color: var(--typo3-component-disabled-color);
--typo3-list-item-disabled-bg: var(--typo3-component-disabled-bg);
--typo3-list-item-disabled-border-color: var(--typo3-component-disabled-border-color);
// Legends
--typo3-legend-font-weight: 600;
// Input fields
--typo3-input-color: #{$input-color};
--typo3-input-color-placeholder: #{$input-color-placeholder};
--typo3-input-bg: #{$input-bg};
--typo3-input-border-width: #{$input-border-width};
--typo3-input-border-color: #{$input-border-color};
--typo3-input-border-radius: #{$border-radius};
--typo3-input-box-shadow: #{$input-box-shadow};
--typo3-input-focus-color: #{$input-focus-color};
--typo3-input-focus-bg: #{$input-focus-bg};
--typo3-input-focus-border-color: #{$input-focus-border-color};
--typo3-input-focus-box-shadow: #{$input-focus-box-shadow};
--typo3-input-disabled-color: #{$input-disabled-color};
--typo3-input-disabled-bg: #{$input-disabled-bg};
--typo3-input-disabled-border-color: #{$input-disabled-border-color};
}
@mixin lightmode {
--typo3-component-color-scheme: var(--typo3-light-color-scheme);
--typo3-component-color: var(--typo3-light-color);
--typo3-component-primary-color: var(--typo3-light-primary-color);
--typo3-component-secondary-color: var(--typo3-light-secondary-color);
--typo3-component-bg: var(--typo3-light-bg);
--typo3-component-border-color: var(--typo3-light-border-color);
--typo3-component-link-color: var(--typo3-light-link-color);
--typo3-component-link-hover-color: var(--typo3-light-link-hover-color);
--typo3-component-hover-color: var(--typo3-light-hover-color);
--typo3-component-hover-bg: var(--typo3-light-hover-bg);
--typo3-component-hover-border-color: var(--typo3-light-hover-border-color);
--typo3-component-focus-color: var(--typo3-light-focus-color);
--typo3-component-focus-bg: var(--typo3-light-focus-bg);
--typo3-component-focus-border-color: var(--typo3-light-focus-border-color);
--typo3-component-active-color: var(--typo3-light-active-color);
--typo3-component-active-bg: var(--typo3-light-active-bg);
--typo3-component-active-border-color: var(--typo3-light-active-border-color);
--typo3-component-disabled-color: var(--typo3-light-disabled-color);
--typo3-component-disabled-bg: var(--typo3-light-disabled-bg);
--typo3-component-disabled-border-color: var(--typo3-light-disabled-border-color);
}
@mixin darkmode {
--typo3-component-color-scheme: var(--typo3-dark-color-scheme);
--typo3-component-color: var(--typo3-dark-color);
--typo3-component-primary-color: var(--typo3-dark-primary-color);
--typo3-component-secondary-color: var(--typo3-dark-secondary-color);
--typo3-component-bg: var(--typo3-dark-bg);
--typo3-component-border-color: var(--typo3-dark-border-color);
--typo3-component-link-color: var(--typo3-dark-link-color);
--typo3-component-link-hover-color: var(--typo3-dark-link-hover-color);
--typo3-component-hover-color: var(--typo3-dark-hover-color);
--typo3-component-hover-bg: var(--typo3-dark-hover-bg);
--typo3-component-hover-border-color: var(--typo3-dark-hover-border-color);
--typo3-component-focus-color: var(--typo3-dark-focus-color);
--typo3-component-focus-bg: var(--typo3-dark-focus-bg);
--typo3-component-focus-border-color: var(--typo3-dark-focus-border-color);
--typo3-component-active-color: var(--typo3-dark-active-color);
--typo3-component-active-bg: var(--typo3-dark-active-bg);
--typo3-component-active-border-color: var(--typo3-dark-active-border-color);
--typo3-component-disabled-color: var(--typo3-dark-disabled-color);
--typo3-component-disabled-bg: var(--typo3-dark-disabled-bg);
--typo3-component-disabled-border-color: var(--typo3-dark-disabled-border-color);
}
@media (prefers-color-scheme: dark) {
:root {
@include darkmode;
}
}
//
// Utility Variables
//
:root {
--typo3-position-modifier: 1;
--typo3-position-start: left;
--typo3-position-end: right;
}
[dir="rtl"] {
--typo3-position-modifier: -1;
--typo3-position-start: right;
--typo3-position-end: left;
}
//
// Bootstrap Corrections
//
// Note:
// Some components are already reactive to the preferred color
// scheme of the user. We correct some general global CSS variables
// for some contexts to ensure the display is correct.
//
.dropdown-menu {
--bs-secondary-color: var(--typo3-component-secondary-color);
}