@sbb-esta/lyne-elements-dev 5.0.0-next.3-dev.1779281125 → 5.0.0-next.3-dev.1779298726
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/alert/alert/alert.global.scss +45 -0
- package/alert/alert-group/alert-group.global.scss +8 -0
- package/badge/badge.global.scss +44 -0
- package/breadcrumb/breadcrumb/breadcrumb.global.scss +16 -0
- package/breadcrumb/breadcrumb-group/breadcrumb-group.global.scss +26 -0
- package/button/common/button-common.global.scss +58 -0
- package/button/common/mini-button-common.global.scss +18 -0
- package/button/mini-button-group/mini-button-group.global.scss +35 -0
- package/calendar/calendar/calendar.global.scss +31 -0
- package/calendar/common/calendar-cell-base-element.global.scss +23 -0
- package/card/card/card.global.scss +22 -0
- package/card/card-badge/card-badge.global.scss +19 -0
- package/card/card.library.global.scss +203 -0
- package/carousel/carousel/carousel.global.scss +10 -0
- package/checkbox/checkbox.global.scss +10 -0
- package/checkbox/common/checkbox-common.global.scss +25 -0
- package/chip/chip/chip.global.scss +16 -0
- package/chip/chip-group/chip-group.global.scss +62 -0
- package/chip-label/chip-label.global.scss +11 -0
- package/clock/clock.global.scss +9 -0
- package/container/container/container.global.scss +21 -0
- package/container/sticky-bar/sticky-bar.global.scss +17 -0
- package/core/base-elements/selection-group-base-element.global.scss +12 -0
- package/core/mixins/panel-common.global.scss +41 -0
- package/dialog/dialog/dialog.global.scss +32 -0
- package/dialog/dialog-close-button/dialog-close-button.global.scss +35 -0
- package/dialog/dialog-content/dialog-content.global.scss +13 -0
- package/dialog/dialog-title/dialog-title.global.scss +13 -0
- package/divider/divider.global.scss +9 -0
- package/expansion-panel/expansion-panel/expansion-panel.global.scss +21 -0
- package/expansion-panel/expansion-panel-content/expansion-panel-content.global.scss +16 -0
- package/expansion-panel/expansion-panel-header/expansion-panel-header.global.scss +41 -0
- package/file-selector/common/file-selector.global.scss +25 -0
- package/flip-card/flip-card/flip-card.global.scss +25 -0
- package/flip-card/flip-card-details/flip-card-details.global.scss +7 -0
- package/flip-card/flip-card-summary/flip-card-summary.global.scss +17 -0
- package/footer/footer.global.scss +17 -0
- package/form-field/error/error.global.scss +9 -0
- package/form-field/form-field/form-field.global.scss +271 -0
- package/header/common/header-action.global.scss +41 -0
- package/header/header/header.global.scss +62 -0
- package/header/header-environment/header-environment.global.scss +10 -0
- package/icon-sidebar/icon-sidebar/icon-sidebar.global.scss +21 -0
- package/lead-container/lead-container.global.scss +31 -0
- package/link/common/block-link.global.scss +15 -0
- package/link/link.library.global.scss +121 -0
- package/loading-indicator/loading-indicator.global.scss +10 -0
- package/loading-indicator-circle/loading-indicator-circle.global.scss +19 -0
- package/logo/logo.global.scss +15 -0
- package/map-container/map-container.global.scss +15 -0
- package/menu/common/menu-action.global.scss +14 -0
- package/menu/menu/menu.global.scss +23 -0
- package/message/message.global.scss +20 -0
- package/mini-calendar/mini-calendar-day/mini-calendar-day.global.scss +9 -0
- package/mini-calendar/mini-calendar-month/mini-calendar-month.global.scss +12 -0
- package/navigation/common/navigation-action.global.scss +11 -0
- package/navigation/navigation/navigation.global.scss +36 -0
- package/navigation/navigation-list/navigation-list.global.scss +10 -0
- package/navigation/navigation-marker/navigation-marker.global.scss +17 -0
- package/navigation/navigation-section/navigation-section.global.scss +34 -0
- package/notification/notification.global.scss +53 -0
- package/option/optgroup/optgroup.global.scss +17 -0
- package/option/option/option.global.scss +51 -0
- package/option/option-hint/option-hint.global.scss +17 -0
- package/option/option-panel-common.global.scss +11 -0
- package/overlay/overlay.global.scss +13 -0
- package/package.json +2 -2
- package/paginator/common/paginator-common.global.scss +14 -0
- package/paginator/compact-paginator/compact-paginator.global.scss +9 -0
- package/paginator/paginator/paginator.global.scss +10 -0
- package/popover/popover.global.scss +12 -0
- package/radio-button/common/radio-button-common.global.scss +37 -0
- package/select/select.global.scss +24 -0
- package/selection-action-panel/selection-action-panel.global.scss +19 -0
- package/selection-expansion-panel/selection-expansion-panel.global.scss +21 -0
- package/sidebar/sidebar/sidebar.global.scss +19 -0
- package/sidebar/sidebar-close-button/sidebar-close-button.global.scss +10 -0
- package/sidebar/sidebar-container/sidebar-container.global.scss +62 -0
- package/signet/signet.global.scss +16 -0
- package/slider/slider.global.scss +30 -0
- package/status/status.global.scss +10 -0
- package/stepper/step-label/step-label.global.scss +43 -0
- package/stepper/stepper/stepper.global.scss +10 -0
- package/table/table.global.scss +295 -0
- package/tabs/common/tab-group-common.global.scss +17 -0
- package/tabs/common/tab-label-common.global.scss +38 -0
- package/tabs/tab-nav-bar/tab-nav-bar.global.scss +10 -0
- package/tag/tag/tag.global.scss +41 -0
- package/teaser/teaser.global.scss +24 -0
- package/teaser-hero/teaser-hero.global.scss +27 -0
- package/teaser-panel/teaser-panel.global.scss +33 -0
- package/teaser-product/common/teaser-product-common.global.scss +50 -0
- package/time-input/time-input.global.scss +11 -0
- package/timetable-form/timetable-form/timetable-form.global.scss +97 -0
- package/timetable-form/timetable-form-details/timetable-form-details.global.scss +12 -0
- package/timetable-form/timetable-form-field/timetable-form-field.global.scss +10 -0
- package/timetable-occupancy/timetable-occupancy.global.scss +10 -0
- package/title/title-common.global.scss +7 -0
- package/title/title.global.scss +12 -0
- package/toast/toast.global.scss +18 -0
- package/toggle/toggle/toggle.global.scss +44 -0
- package/toggle/toggle-option/toggle-option.global.scss +10 -0
- package/toggle-check/toggle-check.global.scss +32 -0
- package/tooltip/tooltip.global.scss +20 -0
- package/train/train-blocked-passage/train-blocked-passage.global.scss +16 -0
- package/train/train-formation/train-formation.global.scss +26 -0
- package/train/train-wagon-common.global.scss +42 -0
- package/visual-checkbox/visual-checkbox.global.scss +38 -0
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
@use '../../core/styles' as sbb;
|
|
2
|
+
|
|
3
|
+
$theme: 'standard' !default;
|
|
4
|
+
|
|
5
|
+
@mixin base {
|
|
6
|
+
--sbb-form-field-background-color: var(--sbb-background-color-1);
|
|
7
|
+
--sbb-form-field-border-color: var(--sbb-border-color-5);
|
|
8
|
+
--sbb-form-field-border-style: solid;
|
|
9
|
+
--sbb-form-field-border-radius: var(--sbb-border-radius-4x);
|
|
10
|
+
--sbb-form-field-border-width: var(--sbb-border-width-1x);
|
|
11
|
+
--sbb-form-field-color: var(--sbb-color-3);
|
|
12
|
+
--sbb-form-field-label-color: light-dark(var(--sbb-color-metal), var(--sbb-color-smoke));
|
|
13
|
+
--sbb-form-field-prefix-color: light-dark(var(--sbb-color-metal), var(--sbb-color-smoke));
|
|
14
|
+
--sbb-form-field-text-color: var(--sbb-color-3);
|
|
15
|
+
--sbb-form-field-arrow-color: var(--sbb-color-3);
|
|
16
|
+
--sbb-form-field-gap: var(--sbb-spacing-fixed-2x);
|
|
17
|
+
--sbb-form-field-icon-size: var(--sbb-size-icon-ui-small);
|
|
18
|
+
--sbb-form-field-min-height: #{sbb.theme-pattern-select(
|
|
19
|
+
(
|
|
20
|
+
'standard': var(--sbb-size-element-m),
|
|
21
|
+
'lean': var(--sbb-size-element-xs),
|
|
22
|
+
),
|
|
23
|
+
$theme
|
|
24
|
+
)};
|
|
25
|
+
--sbb-form-field-padding-inline: #{sbb.theme-pattern-select(
|
|
26
|
+
(
|
|
27
|
+
'standard': var(--sbb-spacing-fixed-3x),
|
|
28
|
+
'lean': var(--sbb-spacing-fixed-2x),
|
|
29
|
+
),
|
|
30
|
+
$theme
|
|
31
|
+
)};
|
|
32
|
+
--sbb-form-field-input-text-size: #{sbb.theme-pattern-select(
|
|
33
|
+
(
|
|
34
|
+
'standard': var(--sbb-text-font-size-m),
|
|
35
|
+
'lean': var(--sbb-text-font-size-s),
|
|
36
|
+
),
|
|
37
|
+
$theme
|
|
38
|
+
)};
|
|
39
|
+
--sbb-form-field-label-text-size: #{sbb.theme-pattern-select(
|
|
40
|
+
(
|
|
41
|
+
'standard': var(--sbb-text-font-size-xs),
|
|
42
|
+
'lean': var(--sbb-text-font-size-xxs),
|
|
43
|
+
),
|
|
44
|
+
$theme
|
|
45
|
+
)};
|
|
46
|
+
--_sbb-form-field-label-to-input-overlapping: #{sbb.theme-pattern-select(
|
|
47
|
+
(
|
|
48
|
+
'standard': var(--sbb-spacing-fixed-1x),
|
|
49
|
+
'lean': #{sbb.px-to-rem-build(10)},
|
|
50
|
+
),
|
|
51
|
+
$theme
|
|
52
|
+
)};
|
|
53
|
+
--_sbb-form-field-floating-label-transform: #{sbb.theme-pattern-select(
|
|
54
|
+
(
|
|
55
|
+
'standard': #{sbb.px-to-rem-build(8.5)},
|
|
56
|
+
'lean': #{sbb.px-to-rem-build(5.5)},
|
|
57
|
+
),
|
|
58
|
+
$theme
|
|
59
|
+
)};
|
|
60
|
+
--_sbb-form-field-spacer-margin-block-end: #{sbb.theme-pattern-select(
|
|
61
|
+
(
|
|
62
|
+
'standard': calc(-1 * var(--_sbb-form-field-label-to-input-overlapping)),
|
|
63
|
+
'lean': #{sbb.px-to-rem-build(-8.5)},
|
|
64
|
+
),
|
|
65
|
+
$theme
|
|
66
|
+
)};
|
|
67
|
+
--_sbb-form-field-input-margin-block-end: #{sbb.theme-pattern-select(
|
|
68
|
+
(
|
|
69
|
+
'standard': 0,
|
|
70
|
+
'lean': #{sbb.px-to-rem-build(-2)},
|
|
71
|
+
),
|
|
72
|
+
$theme
|
|
73
|
+
)};
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
@mixin base-forced-colors {
|
|
77
|
+
--sbb-form-field-border-color: ButtonBorder;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
@mixin base-breakpoint-large {
|
|
81
|
+
--_sbb-form-field-label-to-input-overlapping: #{sbb.theme-pattern-select(
|
|
82
|
+
(
|
|
83
|
+
'standard': var(--sbb-spacing-fixed-1x),
|
|
84
|
+
'lean': #{sbb.px-to-rem-build(11)},
|
|
85
|
+
),
|
|
86
|
+
$theme
|
|
87
|
+
)};
|
|
88
|
+
--_sbb-form-field-floating-label-transform: #{sbb.theme-pattern-select(
|
|
89
|
+
(
|
|
90
|
+
'standard': #{sbb.px-to-rem-build(10.5)},
|
|
91
|
+
'lean': #{sbb.px-to-rem-build(5)},
|
|
92
|
+
),
|
|
93
|
+
$theme
|
|
94
|
+
)};
|
|
95
|
+
--_sbb-form-field-spacer-margin-block-end: #{sbb.theme-pattern-select(
|
|
96
|
+
(
|
|
97
|
+
'standard': calc(-1 * var(--_sbb-form-field-label-to-input-overlapping)),
|
|
98
|
+
'lean': #{sbb.px-to-rem-build(-8)},
|
|
99
|
+
),
|
|
100
|
+
$theme
|
|
101
|
+
)};
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
@mixin rules {
|
|
105
|
+
:is(sbb-form-field, sbb-timetable-form-field) {
|
|
106
|
+
:where(input, select, textarea, sbb-select, sbb-date-input, sbb-time-input) {
|
|
107
|
+
@include sbb.ellipsis;
|
|
108
|
+
@include sbb.input-reset;
|
|
109
|
+
|
|
110
|
+
// Form elements are naturally in 'display: inline-block'; however, since the form-element container
|
|
111
|
+
// is in 'display: flex' (class "sbb-form-field__input"), they are block-ified, as per documentation:
|
|
112
|
+
// https://developer.mozilla.org/en-US/docs/Web/CSS/Guides/Flexible_box_layout/Basic_concepts#the_flex_container
|
|
113
|
+
// Setting 'display: flex' should not change anything on lyne-elements, but is useful for consumers of lyne-angular,
|
|
114
|
+
// since the rule is valid for Angular custom components which have an inner form element.
|
|
115
|
+
display: flex;
|
|
116
|
+
|
|
117
|
+
// Use !important here to not interfere with Firefox focus ring definition
|
|
118
|
+
// which appears in normalize CSS of several frameworks.
|
|
119
|
+
outline: none !important;
|
|
120
|
+
overflow: var(--sbb-form-field-overflow, hidden);
|
|
121
|
+
width: 100%;
|
|
122
|
+
box-sizing: border-box;
|
|
123
|
+
color: var(--sbb-form-field-text-color);
|
|
124
|
+
|
|
125
|
+
// Fill color needed for Safari
|
|
126
|
+
-webkit-text-fill-color: var(--sbb-form-field-text-color);
|
|
127
|
+
opacity: 1;
|
|
128
|
+
background-color: transparent;
|
|
129
|
+
|
|
130
|
+
// To be more specific than the styles in normalize.scss we need to use !important
|
|
131
|
+
// TODO: Find a better solution
|
|
132
|
+
font-size: var(--sbb-form-field-input-text-size) !important;
|
|
133
|
+
letter-spacing: var(--sbb-typo-letter-spacing-text) !important;
|
|
134
|
+
font-family: var(--sbb-typo-font-family) !important;
|
|
135
|
+
line-height: var(--sbb-typo-line-height-text) !important;
|
|
136
|
+
|
|
137
|
+
&::placeholder {
|
|
138
|
+
@include sbb.placeholder;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
&[floating-label] :where(input, select, textarea, sbb-select)::placeholder,
|
|
143
|
+
// This covers the placeholder of the sbb-date-input and sbb-time-input
|
|
144
|
+
&[floating-label] :where(sbb-date-input, sbb-time-input)::after {
|
|
145
|
+
color: transparent !important;
|
|
146
|
+
-webkit-text-fill-color: transparent !important;
|
|
147
|
+
|
|
148
|
+
@media (forced-colors: active) {
|
|
149
|
+
color: Canvas !important;
|
|
150
|
+
-webkit-text-fill-color: Canvas !important;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
// TODO: Remove if webkit bug is resolved: https://bugs.webkit.org/show_bug.cgi?id=223814
|
|
155
|
+
&:not([floating-label]) :where(input, select, textarea, sbb-select):disabled::placeholder {
|
|
156
|
+
color: light-dark(var(--sbb-color-granite), var(--sbb-color-smoke));
|
|
157
|
+
-webkit-text-fill-color: light-dark(var(--sbb-color-granite), var(--sbb-color-smoke));
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
// Fix positioning issue for select which occurs in Safari
|
|
161
|
+
:where(select) {
|
|
162
|
+
vertical-align: middle;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
:where(select, sbb-select) {
|
|
166
|
+
padding-inline-end: var(--sbb-form-field-select-inline-padding-end);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
#{sbb.theme-pattern-select(('standard': "&[size='s']", 'lean': "&:not([size='m'],[size='l'])"),$theme)}
|
|
170
|
+
:where(input, sbb-date-input, sbb-time-input) {
|
|
171
|
+
// We shrink the input's height to support all types of inputs (especially type=number).
|
|
172
|
+
// Factor 1.25 ensures, letters are not cut.
|
|
173
|
+
height: calc(var(--sbb-form-field-input-text-size) * 1.25);
|
|
174
|
+
|
|
175
|
+
// Avoids Safari bug, where text gets misaligned with type=number
|
|
176
|
+
line-height: 1 !important;
|
|
177
|
+
|
|
178
|
+
// We add the missing block spacing to fit the line-height
|
|
179
|
+
margin-block: calc(
|
|
180
|
+
0.5 * (var(--sbb-form-field-input-text-size) * (var(--sbb-typo-line-height-text) - 1.25))
|
|
181
|
+
);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
// This rule matches the analogous one in the form-field.scss,
|
|
185
|
+
// and it's useful for Angular custom components, assuming that they have an internal form element.
|
|
186
|
+
#{sbb.theme-pattern-select(('standard': "&[size='s']", 'lean': "&:not([size='m'],[size='l'])"),$theme)}
|
|
187
|
+
> :not(sbb-chip-group):has(input, sbb-date-input, sbb-time-input, select, sbb-select) {
|
|
188
|
+
margin-block-end: #{sbb.px-to-rem-build(-2)};
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
:where(textarea) {
|
|
192
|
+
@include sbb.scrollbar;
|
|
193
|
+
|
|
194
|
+
position: relative;
|
|
195
|
+
resize: none;
|
|
196
|
+
|
|
197
|
+
// White-space break needed for Firefox
|
|
198
|
+
white-space: break-spaces;
|
|
199
|
+
overflow-y: auto;
|
|
200
|
+
min-height: calc((var(--sbb-typo-line-height-text) * 1em));
|
|
201
|
+
height: 100%;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
&[size='l'] :where(textarea) {
|
|
205
|
+
padding-block-end: #{sbb.px-to-rem-build(5.5)};
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
&[negative] :where(textarea) {
|
|
209
|
+
@include sbb.scrollbar-variables--color-negative;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
&:has(
|
|
213
|
+
:is(
|
|
214
|
+
:is(input, textarea, select):user-invalid,
|
|
215
|
+
:state(interacted):invalid,
|
|
216
|
+
.ng-touched.ng-invalid,
|
|
217
|
+
.sbb-invalid
|
|
218
|
+
)
|
|
219
|
+
),
|
|
220
|
+
:is(.ng-submitted, .sbb-show-errors) &:has(:is(:invalid, .ng-invalid)) {
|
|
221
|
+
--sbb-form-field-border-color: var(--sbb-color-error);
|
|
222
|
+
--sbb-form-field-text-color: var(--sbb-color-error);
|
|
223
|
+
|
|
224
|
+
&[negative] {
|
|
225
|
+
--sbb-form-field-border-color: var(--sbb-color-red85);
|
|
226
|
+
--sbb-form-field-text-color: var(--sbb-color-red85);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
@media (forced-colors: active) {
|
|
230
|
+
--sbb-form-field-border-color: LinkText !important;
|
|
231
|
+
--sbb-form-field-text-color: LinkText !important;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
:is(sbb-form-field, sbb-timetable-form-field):state(empty):not(
|
|
237
|
+
:state(readonly),
|
|
238
|
+
:state(disabled)
|
|
239
|
+
) {
|
|
240
|
+
:root.sbb-form-field-required-highlight
|
|
241
|
+
&:has(:where(input, select, textarea, sbb-select, sbb-date-input, sbb-time-input)[required]),
|
|
242
|
+
&.sbb-form-field-required-highlight {
|
|
243
|
+
--sbb-form-field-background-color: light-dark(
|
|
244
|
+
color-mix(in srgb, var(--sbb-color-peach) 5%, var(--sbb-background-color-1)),
|
|
245
|
+
color-mix(in srgb, var(--sbb-color-peach) 10%, var(--sbb-background-color-1))
|
|
246
|
+
);
|
|
247
|
+
|
|
248
|
+
&[negative] {
|
|
249
|
+
--sbb-form-field-background-color: color-mix(
|
|
250
|
+
in srgb,
|
|
251
|
+
var(--sbb-color-peach) 10%,
|
|
252
|
+
var(--sbb-background-color-1-negative)
|
|
253
|
+
);
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
// In high contrast we set, regardless of any state, an Asterix (*) for required fields, to ensure the requirement is visible.
|
|
259
|
+
:is(sbb-form-field, sbb-timetable-form-field):not(:state(readonly), :state(disabled)) {
|
|
260
|
+
:root.sbb-form-field-required-highlight
|
|
261
|
+
&:has(:where(input, select, textarea, sbb-select, sbb-date-input, sbb-time-input)[required]),
|
|
262
|
+
&.sbb-form-field-required-highlight {
|
|
263
|
+
@media (forced-colors: active) {
|
|
264
|
+
label::after {
|
|
265
|
+
content: ' *';
|
|
266
|
+
color: Highlight;
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
@use '../../core/styles' as sbb;
|
|
2
|
+
|
|
3
|
+
$theme: 'standard' !default;
|
|
4
|
+
|
|
5
|
+
@mixin base {
|
|
6
|
+
--sbb-header-action-color: var(--sbb-color-1);
|
|
7
|
+
--sbb-header-action-background-color: transparent;
|
|
8
|
+
--sbb-header-action-min-height-s: var(--sbb-size-element-xs);
|
|
9
|
+
--sbb-header-action-min-height-m: var(--sbb-size-element-s);
|
|
10
|
+
--sbb-header-action-min-height: #{sbb.theme-pattern-select(
|
|
11
|
+
(
|
|
12
|
+
'standard': var(--sbb-header-action-min-height-m),
|
|
13
|
+
'lean': var(--sbb-header-action-min-height-s),
|
|
14
|
+
),
|
|
15
|
+
$theme
|
|
16
|
+
)};
|
|
17
|
+
--sbb-header-action-padding-inline-s: var(--sbb-spacing-fixed-4x);
|
|
18
|
+
--sbb-header-action-padding-inline-m: var(--sbb-spacing-fixed-5x);
|
|
19
|
+
--sbb-header-action-padding-inline: #{sbb.theme-pattern-select(
|
|
20
|
+
(
|
|
21
|
+
'standard': var(--sbb-header-action-padding-inline-m),
|
|
22
|
+
'lean': var(--sbb-header-action-padding-inline-s),
|
|
23
|
+
),
|
|
24
|
+
$theme
|
|
25
|
+
)};
|
|
26
|
+
--sbb-header-action-transition-easing: var(--sbb-animation-easing);
|
|
27
|
+
--sbb-header-action-border-color: transparent;
|
|
28
|
+
--sbb-header-action-gap: var(--sbb-spacing-fixed-2x);
|
|
29
|
+
--sbb-header-action-icon-dimension: var(--sbb-size-icon-ui-small);
|
|
30
|
+
--sbb-header-action-active-border-width: var(--sbb-border-width-2x);
|
|
31
|
+
--sbb-header-action-active-border-color: var(--sbb-header-action-color);
|
|
32
|
+
--sbb-header-first-item-icon-shift: #{sbb.px-to-rem-build(2)};
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@mixin base-forced-colors {
|
|
36
|
+
--sbb-header-action-border-color: CanvasText;
|
|
37
|
+
--sbb-header-action-color: LinkText;
|
|
38
|
+
|
|
39
|
+
// Hide border with forced colors, as state is displayed on border
|
|
40
|
+
--sbb-header-action-active-border-width: 0;
|
|
41
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
@use '../../core/styles' as sbb;
|
|
2
|
+
|
|
3
|
+
$theme: 'standard' !default;
|
|
4
|
+
|
|
5
|
+
@mixin base {
|
|
6
|
+
--sbb-header-background: var(--sbb-background-color-1);
|
|
7
|
+
--sbb-header-box-shadow: var(--sbb-box-shadow-level-9-soft);
|
|
8
|
+
--sbb-header-inset-inline-end: 0;
|
|
9
|
+
--sbb-header-position: fixed;
|
|
10
|
+
--sbb-header-height-s: #{sbb.px-to-rem-build(52)};
|
|
11
|
+
--sbb-header-height-m: var(--sbb-spacing-fixed-14x);
|
|
12
|
+
--sbb-header-height: #{sbb.theme-pattern-select(
|
|
13
|
+
(
|
|
14
|
+
'standard': var(--sbb-header-height-m),
|
|
15
|
+
'lean': var(--sbb-header-height-s),
|
|
16
|
+
),
|
|
17
|
+
$theme
|
|
18
|
+
)};
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@mixin base-breakpoint-large {
|
|
22
|
+
--sbb-header-height-s: var(--sbb-spacing-fixed-14x);
|
|
23
|
+
--sbb-header-height-m: var(--sbb-spacing-fixed-24x);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@mixin rules {
|
|
27
|
+
// We would like to provide the height variable globally in order that global styles can be adapted to the header size.
|
|
28
|
+
// For example, the container margin can be adapted to the header height.
|
|
29
|
+
// In standard theme, size='s' overrides the default (size='m').
|
|
30
|
+
// In lean theme, size='m' overrides the default (size='s').
|
|
31
|
+
#{sbb.theme-pattern-select(('standard': ":root:has(sbb-header[size='s'])", 'lean': ":root:has(sbb-header[size='m'])"), $theme)} {
|
|
32
|
+
--sbb-header-height: #{sbb.theme-pattern-select(
|
|
33
|
+
(
|
|
34
|
+
'standard': var(--sbb-header-height-s),
|
|
35
|
+
'lean': var(--sbb-header-height-m),
|
|
36
|
+
),
|
|
37
|
+
$theme
|
|
38
|
+
)};
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// Move container below header
|
|
42
|
+
sbb-header + :where(sbb-sidebar-container, sbb-icon-sidebar-container) {
|
|
43
|
+
margin-block-start: var(--sbb-header-height);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// Helper class for the application name and version in sbb-header.
|
|
47
|
+
.sbb-header-info {
|
|
48
|
+
display: flex;
|
|
49
|
+
padding-inline: var(--sbb-spacing-fixed-4x);
|
|
50
|
+
gap: var(--sbb-spacing-fixed-1x);
|
|
51
|
+
align-items: baseline;
|
|
52
|
+
color: var(--sbb-color-1);
|
|
53
|
+
font-size: var(--sbb-text-font-size-xs);
|
|
54
|
+
letter-spacing: var(--sbb-typo-letter-spacing-text);
|
|
55
|
+
|
|
56
|
+
strong + * {
|
|
57
|
+
font-size: var(--sbb-text-font-size-xxs);
|
|
58
|
+
letter-spacing: var(--sbb-typo-letter-spacing-text);
|
|
59
|
+
color: light-dark(var(--sbb-color-granite), var(--sbb-color-smoke));
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
@use '../../core/styles' as sbb;
|
|
2
|
+
|
|
3
|
+
$theme: 'standard' !default;
|
|
4
|
+
|
|
5
|
+
@mixin base {
|
|
6
|
+
--sbb-header-environment-background-color: var(--sbb-color-granite);
|
|
7
|
+
--sbb-header-environment-color: var(--sbb-color-1-negative);
|
|
8
|
+
--sbb-header-environment-size: #{sbb.px-to-rem-build(38)};
|
|
9
|
+
--sbb-header-environment-rotate: 45deg;
|
|
10
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
@use '../../core/styles' as sbb;
|
|
2
|
+
|
|
3
|
+
$theme: 'standard' !default;
|
|
4
|
+
|
|
5
|
+
@mixin base {
|
|
6
|
+
--sbb-icon-sidebar-background-color: var(--sbb-background-color-1);
|
|
7
|
+
--sbb-icon-sidebar-border-radius: var(--sbb-border-radius-8x);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
@mixin rules {
|
|
11
|
+
// Move the current-page-border to the right side if the sidebar is right positioned
|
|
12
|
+
sbb-icon-sidebar-content + sbb-icon-sidebar :is(sbb-icon-sidebar-link, sbb-icon-sidebar-button) {
|
|
13
|
+
--sbb-icon-sidebar-button__current-border-inset-inline-start: auto;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
// Set the border radius at the left top side if the sidebar is right positioned
|
|
17
|
+
sbb-icon-sidebar-content + sbb-icon-sidebar {
|
|
18
|
+
border-start-end-radius: 0;
|
|
19
|
+
border-start-start-radius: var(--sbb-icon-sidebar-border-radius);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
@use '../core/styles' as sbb;
|
|
2
|
+
|
|
3
|
+
$theme: 'standard' !default;
|
|
4
|
+
|
|
5
|
+
@mixin base {
|
|
6
|
+
--sbb-lead-container-background-color: var(--sbb-background-color-1);
|
|
7
|
+
--sbb-lead-container-image-ratio: 2 / 1;
|
|
8
|
+
--sbb-lead-container-image-overlap: var(--sbb-spacing-fixed-24x);
|
|
9
|
+
--sbb-lead-container-content-padding-block: var(--sbb-spacing-responsive-l);
|
|
10
|
+
--sbb-lead-container-padding-block: 0 var(--sbb-spacing-responsive-l);
|
|
11
|
+
--sbb-lead-container-padding-inline: var(--sbb-layout-base-offset-responsive);
|
|
12
|
+
--sbb-lead-container-border-radius: var(--sbb-border-radius-6x);
|
|
13
|
+
--sbb-lead-container-image-border-radius: 0;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
@mixin base-breakpoint-ultra {
|
|
17
|
+
--sbb-lead-container-image-ratio: 21 / 9;
|
|
18
|
+
--sbb-lead-container-image-border-radius: var(--sbb-lead-container-border-radius);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@mixin rules {
|
|
22
|
+
sbb-lead-container {
|
|
23
|
+
> [slot='image']:is(sbb-image, img, picture),
|
|
24
|
+
> [slot='image'] :is(sbb-image, img, picture):not(.sbb-figure-overlap-image) {
|
|
25
|
+
--sbb-image-aspect-ratio: var(--sbb-lead-container-image-ratio);
|
|
26
|
+
--sbb-image-object-fit: cover;
|
|
27
|
+
|
|
28
|
+
border-radius: var(--sbb-lead-container-image-border-radius);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
@use '../../core/styles' as sbb;
|
|
2
|
+
|
|
3
|
+
$theme: 'standard' !default;
|
|
4
|
+
|
|
5
|
+
@mixin base {
|
|
6
|
+
--sbb-block-link-gap: var(--sbb-spacing-fixed-1x);
|
|
7
|
+
--sbb-block-link-icon-size: var(--sbb-size-icon-ui-small);
|
|
8
|
+
--sbb-block-link-font-size: #{sbb.theme-pattern-select(
|
|
9
|
+
(
|
|
10
|
+
'standard': var(--sbb-text-font-size-s),
|
|
11
|
+
'lean': var(--sbb-text-font-size-xs),
|
|
12
|
+
),
|
|
13
|
+
$theme
|
|
14
|
+
)};
|
|
15
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
@use '../core/styles' as sbb;
|
|
2
|
+
|
|
3
|
+
@mixin common-variables {
|
|
4
|
+
--sbb-link-color-hover: light-dark(var(--sbb-color-primary125), var(--sbb-color-graphite));
|
|
5
|
+
--sbb-link-color-active: light-dark(var(--sbb-color-primary150), var(--sbb-color-metal));
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
@mixin common-variables--negative {
|
|
9
|
+
--sbb-focus-outline-color: var(--sbb-focus-outline-color-dark);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
@mixin block-variables {
|
|
13
|
+
@include common-variables;
|
|
14
|
+
|
|
15
|
+
--sbb-link-color-normal: light-dark(var(--sbb-color-granite), var(--sbb-color-white));
|
|
16
|
+
--sbb-link-color-hover: light-dark(var(--sbb-color-primary125), var(--sbb-color-cloud));
|
|
17
|
+
--sbb-link-color-active: light-dark(var(--sbb-color-primary150), var(--sbb-color-silver));
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
@mixin block-variables--negative {
|
|
21
|
+
@include common-variables--negative;
|
|
22
|
+
|
|
23
|
+
--sbb-link-color-normal: var(--sbb-color-1-negative);
|
|
24
|
+
--sbb-link-color-hover: var(--sbb-color-4-negative);
|
|
25
|
+
--sbb-link-color-active: var(--sbb-color-silver);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// To display a current active page, e.g. if the CSS class sbb-active is set
|
|
29
|
+
@mixin block-variables--active {
|
|
30
|
+
--sbb-link-color-normal: light-dark(var(--sbb-color-black), var(--sbb-color-cement));
|
|
31
|
+
--sbb-link-text-decoration-line: underline;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// To display a current active page, e.g. if the CSS class sbb-active is set
|
|
35
|
+
@mixin block-variables--active-negative {
|
|
36
|
+
--sbb-link-color-normal: var(--sbb-color-cement);
|
|
37
|
+
--sbb-link-text-decoration-line: underline;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@mixin variables {
|
|
41
|
+
@include common-variables;
|
|
42
|
+
|
|
43
|
+
--sbb-link-color-normal: inherit;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@mixin variables--negative {
|
|
47
|
+
@include common-variables--negative;
|
|
48
|
+
|
|
49
|
+
--sbb-link-color-hover: var(--sbb-color-graphite);
|
|
50
|
+
--sbb-link-color-active: var(--sbb-color-metal);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
@mixin variables--button {
|
|
54
|
+
@media (forced-colors: active) {
|
|
55
|
+
--sbb-link-color-normal: ButtonText;
|
|
56
|
+
--sbb-link-color-hover: ButtonText;
|
|
57
|
+
--sbb-link-color-active: ButtonText;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
@mixin base {
|
|
62
|
+
color: var(--sbb-link-color-normal);
|
|
63
|
+
text-decoration-line: var(--sbb-link-text-decoration-line, underline);
|
|
64
|
+
text-decoration-thickness: #{sbb.px-to-rem-build(1)};
|
|
65
|
+
text-underline-offset: 0.3125em; // 5px
|
|
66
|
+
|
|
67
|
+
@media (forced-colors: active) {
|
|
68
|
+
text-decoration: underline;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
@mixin focus-visible {
|
|
73
|
+
&:focus-visible {
|
|
74
|
+
@include sbb.focus-outline;
|
|
75
|
+
|
|
76
|
+
border-radius: calc(var(--sbb-border-radius-4x) - var(--sbb-focus-outline-offset));
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
@mixin hover-rules {
|
|
81
|
+
@include sbb.hover-mq($hover: true) {
|
|
82
|
+
color: var(--sbb-link-color-hover);
|
|
83
|
+
text-decoration-line: var(--sbb-link-hover-text-decoration, underline);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
@mixin hover {
|
|
88
|
+
&:hover {
|
|
89
|
+
@include hover-rules;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
@mixin active-rules {
|
|
94
|
+
color: var(--sbb-link-color-active);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
@mixin active {
|
|
98
|
+
&:active {
|
|
99
|
+
@include active-rules;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
@mixin consolidation {
|
|
104
|
+
@include base;
|
|
105
|
+
@include focus-visible;
|
|
106
|
+
@include hover;
|
|
107
|
+
|
|
108
|
+
// Active definitions have to be after :hover definitions
|
|
109
|
+
@include active;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
@mixin rules {
|
|
113
|
+
@include variables;
|
|
114
|
+
@include consolidation;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
@mixin rules-negative {
|
|
118
|
+
@include variables;
|
|
119
|
+
@include variables--negative;
|
|
120
|
+
@include consolidation;
|
|
121
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
@use '../core/styles' as sbb;
|
|
2
|
+
|
|
3
|
+
$theme: 'standard' !default;
|
|
4
|
+
|
|
5
|
+
@mixin base {
|
|
6
|
+
--sbb-loading-indicator-color: var(--sbb-color-primary);
|
|
7
|
+
--sbb-loading-indicator-window-element-rotation: 55.24deg;
|
|
8
|
+
--sbb-loading-indicator-window-height: #{sbb.px-to-rem-build(18)};
|
|
9
|
+
--sbb-loading-indicator-window-element-width: #{sbb.px-to-rem-build(55)};
|
|
10
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
@use '../core/styles' as sbb;
|
|
2
|
+
|
|
3
|
+
$theme: 'standard' !default;
|
|
4
|
+
|
|
5
|
+
@mixin base {
|
|
6
|
+
--sbb-loading-indicator-circle-color: var(--sbb-color-primary);
|
|
7
|
+
--sbb-loading-indicator-circle-padding: #{sbb.px-to-rem-build(2)};
|
|
8
|
+
--sbb-loading-indicator-circle-background-color: var(--sbb-color-white);
|
|
9
|
+
--sbb-loading-indicator-circle-animated-width: 0.1875em;
|
|
10
|
+
--sbb-loading-indicator-circle-animated-height: 0.1875em;
|
|
11
|
+
--sbb-loading-indicator-circle-animated-border-radius: 50%;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@mixin base-forced-colors {
|
|
15
|
+
--sbb-loading-indicator-circle-animated-width: 50%;
|
|
16
|
+
--sbb-loading-indicator-circle-animated-height: 100%;
|
|
17
|
+
--sbb-loading-indicator-circle-animated-border-radius: 0;
|
|
18
|
+
--sbb-loading-indicator-circle-background: transparent;
|
|
19
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
@use '../core/styles' as sbb;
|
|
2
|
+
|
|
3
|
+
$theme: 'standard' !default;
|
|
4
|
+
|
|
5
|
+
@mixin base {
|
|
6
|
+
--sbb-logo-panel-color: var(--sbb-color-brand);
|
|
7
|
+
--sbb-logo-signet-color: var(--sbb-color-white);
|
|
8
|
+
--sbb-logo-word-mark-color: light-dark(var(--sbb-color-black), var(--sbb-color-white));
|
|
9
|
+
--sbb-logo-aspect-ratio: 454 / 48;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
@mixin base-forced-colors {
|
|
13
|
+
--sbb-logo-panel-color: ButtonText !important;
|
|
14
|
+
--sbb-logo-signet-color: Canvas !important;
|
|
15
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
@use '../core/styles' as sbb;
|
|
2
|
+
|
|
3
|
+
$theme: 'standard' !default;
|
|
4
|
+
|
|
5
|
+
@mixin base {
|
|
6
|
+
--sbb-map-container-map-height-zero: #{sbb.px-to-rem-build(295)};
|
|
7
|
+
--sbb-map-container-map-height-small: #{sbb.px-to-rem-build(320)};
|
|
8
|
+
--sbb-map-container-sidebar-width: #{sbb.px-to-rem-build(400)};
|
|
9
|
+
--sbb-map-container-sidebar-background-color: var(--sbb-background-color-1);
|
|
10
|
+
--sbb-map-container-border-radius: var(--sbb-border-radius-4x);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@mixin base-breakpoint-ultra {
|
|
14
|
+
--sbb-map-container-sidebar-width: #{sbb.px-to-rem-build(480)};
|
|
15
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
@use '../../core/styles' as sbb;
|
|
2
|
+
|
|
3
|
+
$theme: 'standard' !default;
|
|
4
|
+
|
|
5
|
+
@mixin base {
|
|
6
|
+
--sbb-menu-action-border-radius: var(--sbb-border-radius-infinity);
|
|
7
|
+
--sbb-menu-action-outer-horizontal-padding: var(--sbb-spacing-fixed-3x);
|
|
8
|
+
--sbb-menu-action-outer-vertical-padding: var(--sbb-spacing-fixed-1x);
|
|
9
|
+
--sbb-menu-action-gap: var(--sbb-spacing-fixed-2x);
|
|
10
|
+
--sbb-menu-action-color: var(--sbb-color-2-inverted);
|
|
11
|
+
--sbb-menu-action-content-padding-inline: var(--sbb-spacing-fixed-2x);
|
|
12
|
+
--sbb-menu-action-content-padding-block: var(--sbb-spacing-fixed-1x);
|
|
13
|
+
--sbb-menu-action-forced-color-border-color: CanvasText;
|
|
14
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
@use '../../core/styles' as sbb;
|
|
2
|
+
|
|
3
|
+
$theme: 'standard' !default;
|
|
4
|
+
|
|
5
|
+
@mixin base {
|
|
6
|
+
--sbb-menu-animation-easing: ease;
|
|
7
|
+
--sbb-menu-max-width: 100%;
|
|
8
|
+
--sbb-menu-min-width: 100%;
|
|
9
|
+
--sbb-menu-container-height: 100dvh;
|
|
10
|
+
|
|
11
|
+
// 85vh is not an exact value but looks optimized for mobile view.
|
|
12
|
+
--sbb-menu-max-height: calc(85vh - var(--sbb-spacing-fixed-8x));
|
|
13
|
+
--sbb-menu-min-height: #{sbb.px-to-rem-build(48.5)};
|
|
14
|
+
--sbb-menu-border-radius: var(--sbb-border-radius-4x);
|
|
15
|
+
--sbb-menu-color: var(--sbb-color-2-inverted);
|
|
16
|
+
--sbb-menu-background-color: var(--sbb-background-color-1-inverted);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@mixin base-breakpoint-large {
|
|
20
|
+
--sbb-menu-max-width: #{sbb.px-to-rem-build(320)};
|
|
21
|
+
--sbb-menu-min-width: #{sbb.px-to-rem-build(180)};
|
|
22
|
+
--sbb-menu-transform-y: var(--sbb-spacing-fixed-2x);
|
|
23
|
+
}
|